/* ==================================== */
/* reservation.css: レスポンシブ完全対応・UI刷新版 */
/* ==================================== */

/* 1. 来場メリットカード (高さを揃える) */
.visit-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
    align-items: stretch; /* 全てのカードの高さを一番長いものに合わせる */
}

.benefit-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 35px 30px;
    border-left: 4px solid var(--primary-blue);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 2. アクセスブロック (地図と情報のレスポンシブ) */
.showroom-access-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 80px;
    align-items: stretch;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--glass-border);
}

.map-area {
    border: 1px solid var(--glass-border);
    line-height: 0;
    width: 100%;
    min-height: 350px;
}

.map-area iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* 3. 予約フォーム (枠サイズの統一とバグ修正) */
.standard-form {
    max-width: 900px;
    margin: 0 auto;
    width: 100%; /* 親要素内で100%確保 */
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
    margin-bottom: 40px;
}

.form-group.full-width { grid-column: span 2; }

/* 入力フィールドの統一設定 */
.form-group input, 
.form-group select,
.form-group textarea {
    width: 100% !important; /* 幅を100%に強制 */
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #ced4da;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 4px;
    box-sizing: border-box; /* 枠線を含めた計算を徹底 */
}

.form-group input, 
.form-group select {
    height: 56px;
    padding: 0 15px;
}

.form-group textarea {
    min-height: 160px;
    padding: 15px;
}
/* --- 予約フォーム限定の準備中ロック --- */
.standard-form.is-preparing {
    position: relative;
    min-height: 450px; /* メッセージが切れないよう確保 */
}

/* フォーム全体を覆うレイヤー：ここ自体にマスク機能を持たせる */
.form-lock-layer {
    position: absolute;
    inset: -10px; /* フォームより少し広めに覆う */
    background: rgba(255, 255, 255, 0.3);  
     backdrop-filter: blur(5px);         
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;                     /* 強制的に最前面へ */
    pointer-events: all;                /* 下のフォーム入力を完全にブロック */
}

/* メッセージユニットのデザイン */
.lock-message {
    text-align: center;
    padding: 60px 40px;
    /* background: #ffffff; */
    /* border: 1px solid var(--primary-blue); */
    /* box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); */
    max-width: 540px;
    width: 90%;
}

.coming-soon-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    color: var(--primary-blue);
    margin-bottom: 25px;
}

.main-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2.2;
    color: var(--text-dark);
    letter-spacing: 0.05em;
    margin: 0;
}

/* 建築的なアクセントライン */
.line-deco {
    width: 40px;
    height: 1px;
    background: var(--primary-blue);
    margin: 30px auto 0;
    opacity: 0.5;
}

/* 既存の ::before（マスク）は不要になるので削除またはコメントアウト */
.standard-form.is-preparing::before {
    display: none;
}

/* --- セレクトボックスの矢印突き抜けバグ修正 --- */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    appearance: none;          /* デフォルトの矢印を完全に消去 */
    -webkit-appearance: none;   /* Safari/Chrome用 */
    -moz-appearance: none;      /* Firefox用 */
    padding-right: 40px !important;
    cursor: pointer;
}

.select-wrapper::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px; /* 枠の内側に固定 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--primary-blue);
    pointer-events: none;
    z-index: 5;
}

/* 4. レスポンシブ対応の徹底修正 (最重要) */
@media (max-width: 1024px) {
    .visit-benefits-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .showroom-access-block { 
        grid-template-columns: 1fr; 
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* フォームの2列を1列に強制 */
    .form-grid { 
        grid-template-columns: 1fr !important; 
        gap: 25px;
    }
    .form-group.full-width { grid-column: span 1; }
    
    /* スマホでの入力欄の高さ微調整 */
    .form-group input, .form-group select { height: 50px; }
    
    /* 地図の高さを抑える */
    .map-area { min-height: 250px; }
    
    /* 余白の最適化 */
    .card-body { padding: 30px 15px !important; }
}
/* --- Agreement Block --- */
.form-agreement {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
    gap: 10px; /* チェックボックスと文字の距離 */
}

/* チェックボックスをしっかり見せる */
.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue); /* チェック時の色をMONOIDブルーに */
    border: 1px solid var(--border-color);
}

.agreement-text a {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--primary-blue);
    font-weight: 600;
}

.agreement-text span {
    color: #e74c3c; /* 必須の赤 */
    margin-left: 3px;
}

/* 送信ボタンが無効な時の見た目 */
.btn-primary:disabled {
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #fff !important;
    cursor: not-allowed;
    transform: none !important;
    opacity: 0.6;
}
.thanks-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 9999;
}

.thanks-modal.is-active {
    display: flex;
}

.thanks-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
}

.thanks-modal__dialog {
    position: relative;
    width: min(92vw, 1760px);
    min-height: 420px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.thanks-modal__title {
    margin: 0 0 28px;
    font-size: clamp(32px, 3vw, 52px);
    font-weight: 700;
    color: #222222;
    letter-spacing: 0.04em;
}

.thanks-modal__text {
    margin: 0 0 56px;
    font-size: clamp(18px, 1.4vw, 24px);
    color: #444444;
    line-height: 1.8;
}

.thanks-modal__actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.thanks-modal__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 470px);
    height: 100px;
    background: #1f567d;
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.12em;
    transition: opacity 0.2s ease;
}

.thanks-modal__button:hover {
    opacity: 0.88;
}

@media (max-width: 768px) {
    .thanks-modal {
        padding: 20px;
    }

    .thanks-modal__dialog {
        min-height: 320px;
        padding: 48px 24px;
    }

    .thanks-modal__button {
        width: 100%;
        height: 72px;
        font-size: 16px;
    }
}