/* --- お問い合わせページ専用スタイル (カスタムフォーム版) --- */

/* ページ全体コンテナ */
.contact_container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* タイトルエリア */
.contact_title_area {
    text-align: center;
    margin-bottom: 40px;
}

.contact_title_h1 {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.contact_title_desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

/* ========================================
   フォームカード外枠
   ======================================== */
#contact-form-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* セクション共通 */
.contact-section {
    padding: 32px 40px;
    border-bottom: 1px solid #f0f4f7;
}
.contact-section:last-child {
    border-bottom: none;
}

/* セクション見出し */
.contact-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00C8E9;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-section-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

/* ========================================
   フォームフィールド共通
   ======================================== */
.form-field {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
}

.required-mark {
    color: #e74c3c;
    margin-left: 4px;
    font-size: 0.8rem;
}

.optional-mark {
    color: #94a3b8;
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 400;
}

/* テキスト入力 */
.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde3ea;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #222;
    background: #fafbfc;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: #00C8E9;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 200, 233, 0.12);
}

/* セレクトボックス */
.form-select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1.5px solid #dde3ea;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #222;
    background: #fafbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    outline: none;
}

.form-select:focus {
    border-color: #00C8E9;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 200, 233, 0.12);
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dde3ea;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #222;
    background: #fafbfc;
    resize: vertical;
    min-height: 140px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    line-height: 1.7;
}

.form-textarea:focus {
    border-color: #00C8E9;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 200, 233, 0.12);
}

.textarea-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
}

/* ラジオボタン・グループ */
.radio-group,
.radio-group-inline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #333;
    padding: 10px 16px;
    border: 1.5px solid #dde3ea;
    border-radius: 10px;
    transition: all 0.18s ease;
    user-select: none;
    background: #fafbfc;
}

.radio-label:hover {
    border-color: #00C8E9;
    background: #f0fdff;
    color: #007a91;
}

.radio-label input[type="radio"] {
    accent-color: #00C8E9;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.radio-label:has(input:checked) {
    border-color: #00C8E9;
    background: #e6fafd;
    color: #007a91;
    font-weight: 700;
}

/* ========================================
   バリデーションエラー
   ======================================== */
.field-error {
    display: block;
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 5px;
    min-height: 18px;
}

.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
    border-color: #e74c3c;
    background: #fff8f7;
}

.form-field.has-error .radio-label {
    border-color: #f8c8c4;
}

/* ========================================
   条件セクション（アニメーション付き）
   ======================================== */
.conditional-section {
    border-top: 2px solid #e8f8fb;
    background: #f8fdfe;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.conditional-section.hidden {
    display: none;
}

.conditional-section.visible {
    display: block;
    opacity: 0;
    transform: translateY(8px);
    animation: sectionFadeIn 0.35s ease forwards;
}

@keyframes sectionFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   送信エリア
   ======================================== */
.contact-submit-area {
    padding: 28px 40px 36px;
    text-align: center;
    background: #fcfcfd;
    border-top: 1px solid #f0f4f7;
}

#contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 60px;
    background: linear-gradient(135deg, #00C8E9 0%, #00a3bf 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 200, 233, 0.35);
    letter-spacing: 0.04em;
}

#contact-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 200, 233, 0.45);
}

#contact-submit:active:not(:disabled) {
    transform: translateY(0);
}

#contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 送信中スピナー */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* エラーバナー */
#submit-error {
    margin-top: 16px;
    padding: 12px 20px;
    background: #fff0ef;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c0392b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* プライバシー注記 */
.privacy-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.6;
}

.privacy-note a {
    color: #00a3bf;
    text-decoration: underline;
}

/* ========================================
   送信完了画面
   ======================================== */
#contact-success {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 60px 40px;
    text-align: center;
    animation: sectionFadeIn 0.5s ease forwards;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 20px;
}

.success-body {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.9;
    max-width: 480px;
    margin: 0 auto 32px;
    white-space: pre-line;
}

.success-home-btn {
    display: inline-block;
    padding: 13px 40px;
    background: #00C8E9;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 200, 233, 0.3);
}

.success-home-btn:hover {
    background: #00a3bf;
    transform: translateY(-2px);
}

/* --- 一時保存バナーとトグルスイッチ --- */
.storage-banner {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 40px;
    transition: background 0.3s ease;
}

.storage-banner.is-active {
    background: #f0fdfa; /* 有効時はスッキリした青緑系に */
    border-bottom-color: #ccfbf1;
}

.storage-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.storage-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    min-width: 32px;
    text-align: right;
}

.storage-banner.is-active .status-text {
    color: #0d9488;
}

/* トグルスイッチ本体 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #00C8E9;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* 送信エリアのボタン配置 */
.submit-action-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-clear-form {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 5px 10px;
}

.btn-clear-form:hover {
    color: #e74c3c;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 600px) {
    .contact_container {
        padding: 20px 12px 60px;
    }

    .contact-section {
        padding: 24px 20px;
    }

    .contact-submit-area {
        padding: 24px 20px 32px;
    }

    .contact_title_h1 {
        font-size: 1.6rem;
    }

    #contact-submit {
        width: 100%;
        padding: 15px 20px;
    }

    .radio-group-inline {
        flex-direction: column;
        gap: 8px;
    }

    #contact-success {
        padding: 40px 24px;
    }

    .storage-banner { padding: 16px 20px; }
}