/* 
 * LeoPalace Resort Guam - Golf Inquiry Form Stylesheet
 */

/* ----------------------------------------
   Hero Section (MV) Styles for Golf Inquiry Page
---------------------------------------- */
.golf-page .slideshow-item:nth-child(1) {
  background-image: url('/golf/img/golf-hero2.jpg');
}

h3 {
  letter-spacing: 1px;
}

/* ----------------------------------------
   Topボタン追加
---------------------------------------- */

.golf-page .mv-nav {
  width: 50%; /* 幅を50%に変更（2つの場合は100%） */
  max-width: 400px; /* 最大幅を設定 */
  margin: 0 auto; /* 中央揃え */
}

.golf-page .m-nav-item {
  width: 100%; /* ボタン1つの場合は幅100% */
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .golf-page .mv-nav {
    width: 80%; /* モバイル表示では幅を広げる */
  }
}

@media screen and (max-width: 550px) {
  .golf-page .mv-nav {
    width: 100%; /* 小さい画面では最大幅 */
  }
}

/* ----------------------------------------
   Inquiry Form Section
---------------------------------------- */
.inquiry-section {
  padding: 60px 0;
}

.form-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  width: 100%;
}

label {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  margin-bottom: 8px;
  font-weight: 400;
}

.required {
  color: #E93B3D;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-size: var(--font-size-sm);
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-family: 'Roboto', sans-serif;
}

/* ========================================
   フォームフィールドのカラー統一設定
======================================== */

/* ----------------------------------------
   デフォルト状態：全てのフィールドを#999に統一
---------------------------------------- */

/* 通常のセレクトボックス（Please selectなど） */
select {
  color: #999 !important;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23918A7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;
}

/* 国コード選択（Phone Number） */
.country-code-select select {
  color: #999 !important;
  width: 100%;
  height: 46px;
  padding: 12px 30px 12px 12px;
  border: none;
  background-color: transparent;
  border-radius: 0;
  box-sizing: border-box;
  font-size: var(--font-size-sm);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23918A7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 日付入力フィールド（Planned Date of Play） */
input[type="date"] {
  color: #999 !important;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-size: var(--font-size-sm);
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-family: 'Roboto', sans-serif;
}

/* ----------------------------------------
   選択・入力後：黒色に変更
---------------------------------------- */

/* セレクトボックス：値が選択された場合 */
select:valid:not([value=""]) {
  color: var(--color-text) !important;
}

/* セレクトボックス：デフォルト値以外が選択された場合（より具体的） */
select option:checked:not([value=""]) {
  color: var(--color-text) !important;
}

/* 国コード選択：値が選択された場合 */
.country-code-select select:valid:not([value=""]) {
  color: var(--color-text) !important;
}

/* 日付入力：値が入力された場合 */
input[type="date"]:valid {
  color: var(--color-text) !important;
}

/* 日付入力：値が設定されている場合（Webkit用） */
input[type="date"]:not(:placeholder-shown) {
  color: var(--color-text) !important;
}

/* ----------------------------------------
   フォーカス時の動作
---------------------------------------- */

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(145, 138, 122, 0.2);
  outline: none;
  color: var(--color-text);
}

/* フォーカス時は色を維持（入力値があれば黒、なければグレー） */
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(145, 138, 122, 0.2);
  outline: none;
  /* colorはvalidation状態に依存 */
}

.country-code-select select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.5);
  /* colorはvalidation状態に依存 */
}

/* ----------------------------------------
   オプション（ドロップダウン内）の色
---------------------------------------- */

/* セレクトボックス内のオプションは常に黒 */
select option {
  color: var(--color-text) !important;
  background-color: white;
}

.country-code-select select option {
  color: var(--color-text) !important;
  background-color: white;
}

/* ----------------------------------------
   ブラウザ固有の調整
---------------------------------------- */

/* Chrome/Safari用の日付入力フィールド調整 */
input[type="date"]::-webkit-datetime-edit-text {
  color: inherit;
}

input[type="date"]::-webkit-datetime-edit-month-field {
  color: inherit;
}

input[type="date"]::-webkit-datetime-edit-day-field {
  color: inherit;
}

input[type="date"]::-webkit-datetime-edit-year-field {
  color: inherit;
}

/* Firefox用の日付入力フィールド調整 */
input[type="date"]::-moz-placeholder {
  color: #999;
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 120px;
  color: var(--color-text);
}

.privacy-policy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.privacy-policy input[type="checkbox"] {
  /* 非表示ではなく、小さくして配置する */
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  position: absolute;
  overflow: hidden;
  opacity: 1; /* 不透明にする */
  z-index: 1; /* 正のz-indexを設定 */
  pointer-events: auto; /* ポインターイベントを有効に */
}

/* カスタムチェックボックスのラベルスタイル */
.privacy-policy label {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  display: inline-block;
  line-height: 1.5;
  margin-bottom: 0;
  font-size: var(--font-size-xs);
}

/* チェックボックスのカスタム外観 */
.privacy-policy label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 3px;
  box-sizing: border-box;
}

.privacy-policy input[type="checkbox"]:checked + label:before {
  background-color: #f9f9f9;
}

/* チェックされた状態のカスタム外観 */
.privacy-policy input[type="checkbox"]:checked + label:after {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  font-size: 14px;
  color: #918A7A;
  text-align: center;
  line-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* フォーカス状態のスタイル */
.privacy-policy input[type="checkbox"]:focus + label:before {
  box-shadow: 0 0 0 2px rgba(145, 138, 122, 0.2);
}

/* エラー状態 */
.privacy-policy.error-field label:before {
  border-color: #E53E3E;
}

.privacy-policy a {
  text-decoration: underline;
  color: var(--color-primary);
  transition: color 0.3s;
}

.privacy-policy a:hover {
  color: var(--color-hover);
}

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 14px 40px;
  border-radius: var(--border-radius);
  border: none;
  font-size: var(--font-size-sm);
  font-weight: 400;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  gap: 8px;
}

.submit-btn:hover {
  background-color: #776f62;
  transform: translateY(-2px);
}

.submit-btn:hover .circle-icon {
  background-color: var(--color-hover);
}

.submit-btn:hover .circle-icon-inner {
  border-color: transparent transparent transparent var(--color-white);
}

.error-message {
  background-color: #FDE8E8;
  color: #E53E3E;
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: var(--font-size-sm);
}

.success-message {
  display: block !important;
  text-align: center !important;
  padding: 30px !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-radius: 10px !important;
  margin: 20px auto !important;
  max-width: 600px !important;
  position: relative !important;
  z-index: 100 !important;
}

.message-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  margin-bottom: 20px !important;
}

.message-content svg {
  color: #38A169 !important;
  width: 40px !important;
  height: 40px !important;
  display: inline-block !important;
}

.message-content p {
  font-size: var(--font-size-md);
  font-weight: 400;
  color: var(--color-text);
}

/* ----------------------------------------
   Contact Section
---------------------------------------- */
.contact-section {
  padding: 80px 0;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.contact-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(145, 138, 122, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.contact-icon svg {
  width: 25px;
  height: 25px;
}

.contact-card h3 {
  margin-bottom: 15px;
  color: var(--color-primary);
  font-weight: 500;
}

.contact-card p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: 15px;
}

.contact-card a,
.contact-card address {
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 400;
  margin-bottom: 5px;
  transition: color 0.3s;
  font-style: normal;
}

.contact-card a:hover {
  color: var(--color-hover);
}

.contact-card .hours {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  margin-top: 5px;
}

.map-link {
  display: inline-block;
  color: var(--color-primary);
  margin-top: 10px;
  font-size: var(--font-size-xs);
  text-decoration: underline;
}

/* ----------------------------------------
   Business Hours Section
---------------------------------------- */
.hours-section {
  padding-bottom: 100px;
}

.hours-table-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  max-width: 600px;
  margin: 40px auto 0;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table th,
.hours-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.hours-table th {
  font-weight: 500;
  color: var(--color-primary);
  width: 35%;
}

.hours-table td {
  color: var(--color-text);
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: none;
}

.hours-note {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  font-style: italic;
  margin-top: 20px;
  text-align: center;
}

/* ----------------------------------------
   Phone Input Container
---------------------------------------- */
.phone-input-container {
  display: flex;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.phone-input-container:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(145, 138, 122, 0.2);
}

/* 国コード選択部分 - 固定幅で統一 */
.country-code-select {
  width: 45% !important; /* 固定幅に変更 */
  min-width: 160px; /* 最小幅を統一 */
  max-width: 200px; /* 最大幅を制限 */
  flex: 0 0 auto;
  position: relative;
  border-right: 1px solid var(--color-border);
}

/* 電話番号入力部分 - 残りスペースを使用 */
.phone-input-container input[type="tel"] {
  flex: 1;
  width: auto; /* flexで自動調整 */
  height: 46px;
  padding: 12px;
  border: none;
  background-color: transparent;
  border-radius: 0;
  box-sizing: border-box;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  min-width: 0; /* flexアイテムがテキストによって最小幅を持たないように */
}

.phone-input-container input[type="tel"]:focus,
.country-code-select select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.5);
}

/* 言語固有の調整が必要な場合のクラス */
.country-code-select.ja {
  /* 日本語版で特別な調整が必要な場合 */
}

.country-code-select.ko {
  /* 韓国語版で特別な調整が必要な場合 */
}

.country-code-select.en {
  /* 英語版で特別な調整が必要な場合 */
}

.common-more-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #918A7A !important;
  color: #FFFFFF !important;
  padding: 14px 40px !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  margin-top: 30px !important;
}

.mt-lg {
  margin-top: 30px;
}

/* reCAPTCHA スタイル */
.g-recaptcha-container {
  margin: 20px 0;
}

.recaptcha-error {
  color: #E53E3E;
  font-size: var(--font-size-xs);
  margin-top: 5px;
}

/* エラー表示のスタイル */
.error-field {
  border-color: #E53E3E !important;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
}

/* ハニーポット（ボット対策）フィールド */
.honeypot-field {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

/* プレースホルダーの色を設定 */
::placeholder {
  color: #999;
  opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: #999;
}

::-ms-input-placeholder { /* Microsoft Edge */
  color: #999;
}

/* ----------------------------------------
   Responsive Styles
---------------------------------------- */
@media screen and (max-width: 1024px) {
  .contact-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .contact-card {
    padding: 25px 15px;
  }
  
  .country-code-select {
    width: 40% !important;
    min-width: 140px;
    max-width: 180px;
  }
  
  .country-code-select select:focus {
    height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    background-color: #f9f9f9;
    padding: 12px;
    /* 色は上記のvalidation状態ルールに従う */
  }
}

@media screen and (max-width: 768px) {
  .inquiry-section {
    padding: 40px 0;
  }
  
  .form-container {
    padding: 25px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-card {
    padding: 30px;
  }
  
  .hours-table-container {
    padding: 20px;
  }
  
  .hours-table th,
  .hours-table td {
    padding: 10px;
  }
  
  .phone-input-container {
    flex-direction: column;
    border: none;
    background-color: transparent;
    box-shadow: none;
  }

  .phone-input-container:focus-within {
    border: none;
    box-shadow: none;
  }
  
  .country-code-select {
    width: 100% !important;
    min-width: auto;
    max-width: none;
    margin-bottom: 15px;
    border-right: none;
  }
  
  .country-code-select select {
    border-radius: 5px;
    margin-bottom: 10px;
  }

  .country-code-select select:focus {
    height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    background-color: #f9f9f9;
    padding: 12px;
  }
  
  .phone-input-container input[type="tel"] {
    border-radius: 5px;
  }
  
  .phone-input-container input[type="tel"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(145, 138, 122, 0.2);
    background-color: #f9f9f9;
  }
}

@media screen and (max-width: 480px) {
  .form-container {
    padding: 20px 15px;
  }
  
  .inquiry-form {
    gap: 15px;
  }
  
  .submit-btn {
    width: 100%;
    padding: 12px;
  }
  
  .country-code-select select {
    font-size: 14px;
    padding: 10px 25px 10px 10px;
  }
  
  .phone-input-container input[type="tel"] {
    font-size: 14px;
    padding: 10px;
  }

  input#phone,
  select#country_code{
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: var(--font-size-sm);
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
    font-family: 'Roboto', sans-serif;
  }
}

/* フッター強制表示 */
footer {
  display: block !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1000 !important;
  opacity: 1 !important;
}


/* 修正版：国コード選択フィールドの色設定 */

/* 国コードセレクト：デフォルト状態はグレー */
.country-code-select select {
  color: #999 !important;
  width: 100%;
  height: 46px;
  padding: 12px 30px 12px 12px;
  border: none;
  background-color: transparent;
  border-radius: 0;
  box-sizing: border-box;
  font-size: var(--font-size-sm);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23918A7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 国コードセレクト：値が選択された場合は黒に変更 */
.country-code-select select.has-value,
.country-code-select select:valid:not([value=""]) {
  color: #000 !important;
}

/* 他のセレクトボックス：値が選択された場合 */
select.has-value:not([name="country_code"]),
select:valid:not([value=""]):not([name="country_code"]) {
  color: #000 !important;
}

/* 日付入力：値が入力された場合 */
input[type="date"].has-value,
input[type="date"]:valid {
  color: #000 !important;
}

input[type="date"].has-value::-webkit-datetime-edit,
input[type="date"].has-value::-webkit-datetime-edit-text,
input[type="date"].has-value::-webkit-datetime-edit-month-field,
input[type="date"].has-value::-webkit-datetime-edit-day-field,
input[type="date"].has-value::-webkit-datetime-edit-year-field {
  color: #000 !important;
}

/* 削除：以下の行をCSSから削除してください */
/* 
国コードは常にグレー（例外なし）の部分を削除
select[name="country_code"],
select[name="country_code"].has-value,
select[name="country_code"]:focus,
select[name="country_code"]:hover,
select[name="country_code"][style*="color"] {
    color: #999 !important;
}
*/