/* ==========================================================================
   大洋商会 統合お問い合わせフォーム＆受付管理スイート (taiyo-contact.css v1.0.0)
   ========================================================================== */

/* Cocoon 1カラム強制＆サイドバー非表示（お問い合わせページ専用） */
body.taiyo-contact-fullwidth #sidebar,
body.taiyo-contact-fullwidth .sidebar,
body.taiyo-contact-fullwidth aside#sidebar,
body.taiyo-contact-fullwidth .widget-sidebar {
    display: none !important;
}
body.taiyo-contact-fullwidth #main,
body.taiyo-contact-fullwidth .main,
body.taiyo-contact-fullwidth article,
body.taiyo-contact-fullwidth .article,
body.taiyo-contact-fullwidth .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
}
body.taiyo-contact-fullwidth .entry-title,
body.taiyo-contact-fullwidth .page-title,
body.taiyo-contact-fullwidth h1.page-title {
    display: none !important;
}

/* コンテナ全体 */
.taiyo-cf-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    color: #1e293b;
    line-height: 1.75;
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 0 40px;
    box-sizing: border-box;
}
.taiyo-cf-wrapper * {
    box-sizing: border-box;
}

/* Cocoonの見出し装飾干渉を完全遮断 */
.taiyo-cf-wrapper h1::before, .taiyo-cf-wrapper h1::after,
.taiyo-cf-wrapper h2::before, .taiyo-cf-wrapper h2::after,
.taiyo-cf-wrapper h3::before, .taiyo-cf-wrapper h3::after,
.taiyo-cf-wrapper h4::before, .taiyo-cf-wrapper h4::after {
    display: none !important;
    content: none !important;
    border: none !important;
    background: none !important;
}

/* 導入ヘッダーカード */
.taiyo-cf-intro-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 30px 32px;
    margin-bottom: 26px;
    box-shadow: 0 4px 16px rgba(15, 76, 129, 0.05);
    text-align: center;
}
.taiyo-cf-site-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 20px;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.4px;
}
.taiyo-cf-site-badge.is-main {
    background: linear-gradient(90deg, #0f4c81 0%, #0284c7 100%);
}
.taiyo-cf-site-badge.is-sub {
    background: linear-gradient(90deg, #b45309 0%, #ea580c 100%);
}
.taiyo-cf-main-title {
    font-size: clamp(21px, 3.5vw, 27px);
    font-weight: 800;
    color: #0f4c81 !important;
    margin: 0 0 12px 0;
    line-height: 1.35;
}
.taiyo-cf-lead-text {
    font-size: 14.5px;
    color: #475569;
    max-width: 780px;
    margin: 0 auto 20px;
    line-height: 1.8;
}

/* お電話・FAX クイック案内バー */
.taiyo-cf-phone-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    text-align: left;
}
.taiyo-cf-phone-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.taiyo-cf-phone-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f4c81;
}
.taiyo-cf-phone-hours {
    font-size: 12px;
    color: #64748b;
}
.taiyo-cf-phone-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.taiyo-cf-tel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f4c81;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.2);
}
.taiyo-cf-fax-badge {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 7px 14px;
    border-radius: 8px;
}

/* 管理者テスト送信バー */
.taiyo-cf-admin-test-box {
    background: #fefce8;
    border: 2px solid #eab308;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 13px;
    color: #713f12;
}

/* フォームカード本体 */
.taiyo-cf-form-card {
    background: #ffffff;
    border: 2px solid #0f4c81;
    border-radius: 14px;
    padding: 32px 34px;
    box-shadow: 0 6px 22px rgba(15, 76, 129, 0.07);
    margin-bottom: 35px;
}
.taiyo-cf-sec-heading {
    font-size: 17.5px;
    font-weight: 800;
    color: #0f4c81 !important;
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ご用件スマート選択カード */
.taiyo-cf-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.taiyo-cf-type-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.taiyo-cf-type-label:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}
.taiyo-cf-type-label.is-selected {
    border-color: #0f4c81;
    background: #eff6ff;
    box-shadow: 0 2px 10px rgba(15, 76, 129, 0.12);
}
.taiyo-cf-type-label input[type="radio"] {
    margin-top: 4px;
    transform: scale(1.2);
    accent-color: #0f4c81;
}
.taiyo-cf-type-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f4c81;
    display: block;
    margin-bottom: 2px;
}
.taiyo-cf-type-sub {
    font-size: 12px;
    color: #64748b;
    display: block;
    line-height: 1.45;
}

/* 動的展開ボックス（資材見積り・二次加工・ワークショップ） */
.taiyo-cf-dynamic-panel {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 5px solid #0284c7;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 26px;
    display: none;
}
.taiyo-cf-dynamic-panel.is-active {
    display: block;
    animation: taiyoFadeIn 0.25s ease;
}
@keyframes taiyoFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.taiyo-cf-dynamic-title {
    font-size: 15px;
    font-weight: 800;
    color: #0369a1;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* フォーム行・入力フィールド */
.taiyo-cf-row {
    margin-bottom: 20px;
}
.taiyo-cf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.taiyo-cf-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.taiyo-cf-req {
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
}
.taiyo-cf-opt {
    background: #64748b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.taiyo-cf-input,
.taiyo-cf-select,
.taiyo-cf-textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14.5px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.taiyo-cf-input:focus,
.taiyo-cf-select:focus,
.taiyo-cf-textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.taiyo-cf-help {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* ファイル添付ボックス */
.taiyo-cf-upload-box {
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: left;
}
.taiyo-cf-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.taiyo-cf-upload-row:last-child {
    margin-bottom: 0;
}

/* セキュリティ＆プライバシー同意ボックス */
.taiyo-cf-security-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 13px;
    color: #166534;
    line-height: 1.7;
}
.taiyo-cf-consent-wrap {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: center;
}
.taiyo-cf-consent-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: #92400e;
    cursor: pointer;
}
.taiyo-cf-consent-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0f4c81;
}

/* 送信ボタン */
.taiyo-cf-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(90deg, #0f4c81 0%, #0284c7 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.taiyo-cf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 76, 129, 0.35);
}
.taiyo-cf-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* エラーメッセージ表示 */
.taiyo-cf-error-alert {
    background: #fef2f2;
    border: 2px solid #ef4444;
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 700;
    display: none;
}

/* 送信完了モーダルポップアップ */
.taiyo-cf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.taiyo-cf-modal-overlay.is-open {
    display: flex;
}
.taiyo-cf-modal-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    padding: 34px 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-top: 8px solid #0284c7;
    animation: taiyoModalPop 0.3s ease;
}
@keyframes taiyoModalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.taiyo-cf-modal-icon {
    font-size: 48px;
    margin-bottom: 10px;
}
.taiyo-cf-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f4c81 !important;
    margin: 0 0 12px 0;
}
.taiyo-cf-modal-num {
    display: inline-block;
    background: #eff6ff;
    border: 2px solid #93c5fd;
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 800;
    padding: 8px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.taiyo-cf-modal-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.8;
    text-align: left;
    background: #f8fafc;
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 22px;
}
.taiyo-cf-modal-close-btn {
    background: #0f4c81;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    padding: 12px 34px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
    .taiyo-cf-intro-card {
        padding: 22px 18px;
    }
    .taiyo-cf-form-card {
        padding: 22px 18px;
    }
    .taiyo-cf-type-grid,
    .taiyo-cf-grid-2 {
        grid-template-columns: 1fr;
    }
    .taiyo-cf-phone-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
