/*
Theme Name: My Inventory Child Theme
Theme URI: https://www.avoriaz.jp/
Description: Hello Elementorの在庫管理用子テーマ
Author: Lodge Avoriaz
Version: 3.5.0
Template: hello-elementor
Text Domain: my-inventory-child

[Table of Contents]
1. 共通設定 (Base)
2. 変数定義 (Variables)
3. ヘッダー・ナビゲーション (Header)
4. フッター (Footer)
5. フォーム共通スタイル (Forms & CF7)
6. カレンダーシステム (Inventory Calendar)
7. モーダルウィンドウ (Policy & Confirm Modal)
8. シュトーレン特設バナー
9. キャンプ・設備ギャラリー (Gallery & Slider)
10. 追従型予約ボタン (Floating Button)
11. その他調整 (Map, Calendar Note etc.)
12. フェードインアニメーション (Animation)
*/

/* =========================================
   1. 共通設定 (Base)
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding-top: 80px; /* ヘッダー固定用の余白 */
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", "メイリオ", sans-serif;
    background: #f6f7fb;
    color: #222;
    line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }

/* 管理バー(ログイン時)のズレ修正 */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* =========================================
   2. 変数定義 (Variables)
   ========================================= */
:root {
    --color-primary: #2C5F2D;   /* フォレストグリーン */
    --color-accent: #E76F51;    /* ウォームオレンジ */
    --color-brown: #8D6E63;     /* ウッドブラウン */
    --form-bg: #fff;
    --form-border: #ccc;
    --form-radius: 4px;
}

/* =========================================
   3. ヘッダー・ナビゲーション (Header)
   ========================================= */
.site-header {
    position: fixed !important; 
    top: 0; left: 0; right: 0; z-index: 99999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    width: 100%; 
    height: 80px;
    transition: background 0.3s, height 0.3s;
}

.header-container {
    max-width: 1100px; width: 100%; margin: 0 auto; 
    padding: 0 1.5rem; /* 上下パディングを0にする */
    display: flex; justify-content: space-between; align-items: center; 
    height: 100%; position: relative;
}
/* 視覚的な中央揃えのための微調整 */
.site-logo, .site-navigation, .header-cta, .menu-toggle { margin-bottom: 5px; }

.site-logo { flex-shrink: 0; display: inline-flex; align-items: center; }
.site-logo a { display: block; line-height: 0; }
.site-logo img { height: 48px; width: auto; object-fit: contain; transition: height 0.3s; }

/* PC Nav */
.site-navigation ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 1.5rem; }
.site-navigation a { text-decoration: none; color: #333; font-weight: 600; font-size: 0.95rem; white-space: nowrap; transition: opacity 0.3s; }
.site-navigation a:hover { opacity: 0.7; color: var(--color-accent); }

/* Reserve Button */
.header-cta .btn-reserve {
    background-color: var(--color-accent); color: #fff !important; padding: 0.7rem 1.2rem;
    border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
    white-space: nowrap; transition: all 0.3s; display: inline-block; border: 1px solid var(--color-accent); line-height: 1.2;
}
.header-cta .btn-reserve:hover { background-color: #fff; color: var(--color-accent) !important; }

/* Burger Button */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer; padding: 0;
    width: 40px; height: 40px; margin-left: 10px; position: relative; z-index: 100002;
}
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px auto; background: #333; border-radius: 2px; transition: 0.3s; }

/* Responsive (Mobile/Tablet) */
@media (max-width: 1150px) {
    body { padding-top: 80px; }
    .site-header, .header-container { height: 80px; }
    .header-container { padding: 0 20px; justify-content: space-between; }
    .site-logo img { height: 36px; }
    
    .menu-toggle { display: block; margin-left: 15px; margin-right: 0; }
    .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); margin: 0 auto; }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); margin: 0 auto; }
    
    .header-cta { margin-left: auto; margin-right: 0; }
    .header-cta .btn-reserve { 
        padding: 8px 12px; font-size: 0.8rem; border-radius: 2px; letter-spacing: 0.02em; 
    }
    
    .site-navigation {
        position: fixed !important; top: 80px; left: 0; width: 100%;
        background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        z-index: 100001; display: none !important; flex-direction: column; padding: 1rem 0;
        height: calc(100vh - 80px); overflow-y: auto; -webkit-overflow-scrolling: touch; margin-bottom: 0;
    }
    .site-navigation.is-open { display: flex !important; }
    .site-navigation ul { flex-direction: column; width: 100%; gap: 0; }
    .site-navigation ul li { width: 100%; text-align: center; }
    .site-navigation ul li a { display: block; padding: 1.2rem 0; font-size: 1.1rem; border-bottom: 1px dashed #eee; width: 100%; color: #333; }
}

/* =========================================
   4. フッター (Footer)
   ========================================= */
.site-footer { background-color: var(--color-primary); color: #fff; padding: 40px 0 20px; margin-top: 4rem; }
.footer-container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; text-align: center; }
.footer-info h3 { margin-bottom: 15px; font-size: 1.2rem; }
.footer-links { margin: 20px 0; }
.footer-links a { color: #fff; margin: 0 10px; text-decoration: none; opacity: 0.8; transition: opacity 0.3s; }
.footer-links a:hover { opacity: 1; }
.footer-copyright { margin-top: 30px; font-size: 0.8rem; opacity: 0.6; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; }
.footer-sns { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }
.sns-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 0.9rem; padding: 8px 16px; border: 1px solid rgba(255,255,255,0.3); border-radius: 30px; transition: all 0.3s; background-color: rgba(0,0,0,0.1); }
.sns-link:hover { background-color: #fff; color: var(--color-primary); border-color: #fff; }
.sns-link svg { fill: currentColor; width: 18px; height: 18px; }
.sns-link.instagram:hover { color: #C13584; } .sns-link.x-twitter:hover { color: #000; }

/* =========================================
   5. フォーム共通スタイル (Forms & CF7)
   ========================================= */
.order-form-wrapper { padding: 60px 20px; background-color: #f6f7fb; }
.order-form-container { max-width: 800px; margin: 0 auto; padding: 40px; background: #fff; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
h1.form-page-title { text-align: center; font-size: 1.8rem; margin-bottom: 40px; color: var(--color-primary); font-weight: bold; padding-bottom: 20px; border-bottom: 2px solid #f0f0f0; }
h2.form-title { text-align: center; margin-bottom: 40px; color: #333; font-size: 1.8rem; }
.form-section { margin-bottom: 40px; }
.form-section h3 { margin-top: 0; color: #333; font-size: 1.3rem; border-left: 5px solid var(--color-primary); padding-left: 15px; margin-bottom: 25px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; font-size: 0.95rem; }
.required-mark { color: #ff5252; margin-left: 4px; }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; box-sizing: border-box; }
.form-control:focus { border-color: var(--color-primary); outline: none; }

/* CF7 Buttons */
.wpcf7 input[type="submit"] {
    background-color: var(--color-primary); color: #fff; border: 2px solid var(--color-primary); 
    padding: 15px 50px; border-radius: 30px; font-size: 1.1rem; font-weight: bold; 
    cursor: pointer; transition: all 0.3s; display: block; margin: 30px auto 0; 
    width: 100%; max-width: 300px; box-shadow: 0 4px 10px rgba(44, 95, 45, 0.3);
}
.wpcf7 input[type="submit"]:hover { background-color: #1e421f; border-color: #1e421f; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(44, 95, 45, 0.4); }
.wpcf7 input[type="submit"]:disabled {
    background-color: #fff !important; color: var(--color-primary) !important; border: 2px solid var(--color-primary) !important;
    box-shadow: none !important; opacity: 0.6; cursor: not-allowed; transform: none !important;
}

/* Stollen Buttons */
.btn-primary { background-color: var(--color-primary); color: #fff; padding: 12px 30px; border-radius: 30px; font-weight: bold; border: none; cursor: pointer; transition: 0.3s; width: 100%; max-width: 320px; }
.btn-primary:hover { background-color: #1e421f; transform: translateY(-2px); }
.btn-secondary { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); padding: 10px 20px; border-radius: 30px; font-weight: bold; cursor: pointer; }
.btn-secondary:hover { background: #e8f5e9; }
.recipient-item { background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #eee; }
.recipient-header { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.btn-danger { background: #fff; color: #ff5252; border: 1px solid #ff5252; padding: 5px 15px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; }
.btn-danger:hover { background-color: #fff5f5; }
.hidden { display: none !important; }
#loading-message { text-align: center; display: none; margin-top: 20px; color: var(--color-primary); font-weight: bold; }

@media (max-width: 600px) {
    .order-form-container { padding: 25px 15px; }
    .wpcf7 input[type="submit"] { width: 100%; max-width: none; }
}

/* =========================================
   6. カレンダーシステム (Inventory Calendar)
   ========================================= */
.inventory-calendar-container { max-width: 900px; margin: 20px auto; font-family: sans-serif; border: 1px solid #ccc; padding: 10px; }
#calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
#calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background-color: #ddd; border: 1px solid #ddd; grid-template-rows: repeat(6, 1fr); min-height: 425px; grid-auto-rows: 1fr; }
.day-header, .calendar-day { padding: 10px 5px; text-align: center; background-color: #fff; min-height: 70px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; }
.day-header { font-weight: bold; background-color: #eee; min-height: auto; }
.day-number { display: block; font-size: 1.2em; margin-bottom: 5px; }
.status { display: inline-block; padding: 2px 5px; border-radius: 3px; font-size: 0.8em; font-weight: bold; color: #fff; width: 25px; min-height: 20px; line-height: 1.5; }
.status-placeholder { display: inline-block; padding: 2px 5px; border-radius: 3px; font-size: 0.8em; font-weight: bold; color: #9E9E9E; width: 25px; min-height: 20px; line-height: 1.5; background-color: transparent; }
.status-○ { background-color: #4CAF50; } .status-△ { background-color: #FFC107; } .status-✕ { background-color: #F44336; } .status-none { background-color: #9E9E9E; }
.is-fully-booked { background-color: #ffe0e0 !important; } .empty-day { background-color: #f7f7f7; }
.past-day { opacity: 0.6; background-color: #e0e0e0 !important; cursor: default; } .past-day .status { display: none; } .past-day .status-placeholder { display: inline-block; }
.calendar-day.selected-from, .calendar-day.selected-to { background-color: #007bff !important; color: #fff !important; border-radius: 5px; } .calendar-day.selected-range { background-color: #bde0ff !important; }
.status-ー { background-color: #f0f0f0; color: #555; border: 1px solid #ccc; } .status-tel { background-color: #ff9800; color: #fff; font-weight: bold; width: auto; padding: 2px 8px; }

@media (max-width: 600px) {
    .inventory-calendar-container { padding: 5px; border: none; }
    .day-header, .calendar-day { min-height: 60px; font-size: 0.9rem; }
}

/* =========================================
   7. モーダルウィンドウ (Policy & Confirm Modal)
   ========================================= */
.policy-modal-overlay, .confirm-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 100000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; padding: 20px;
}
.policy-modal-overlay.is-open, .confirm-modal-overlay.active { opacity: 1; visibility: visible; }
.policy-modal-content, .confirm-modal-content {
    background: #fff; width: 100%; max-width: 800px; max-height: 85vh;
    border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative; display: flex; flex-direction: column;
}
.policy-modal-header, .confirm-header {
    padding: 20px; border-bottom: 1px solid #eee; 
    font-size: 1.4rem; font-weight: bold; color: var(--color-primary);
    display: flex; justify-content: space-between; align-items: center;
}
.policy-modal-close { background: none; border: none; font-size: 2rem; line-height: 1; cursor: pointer; color: #666; }
.policy-modal-body, .confirm-body { padding: 30px; overflow-y: auto; font-size: 0.95rem; line-height: 1.8; }
.confirm-footer {
    padding: 20px; border-top: 1px solid #eee; background: #fff;
    border-radius: 0 0 8px 8px; text-align: center; display: flex; justify-content: center; gap: 20px;
}
/* ポリシー・確認画面共通パーツ */
.policy-modal-body h2 { font-size: 1.2rem; border-left: 4px solid var(--color-primary); padding-left: 10px; margin: 30px 0 15px; background: #f9f9f9; padding: 10px; }
.policy-modal-body table, .confirm-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.policy-modal-body th, .policy-modal-body td, .confirm-table th, .confirm-table td { border: 1px solid #ddd; padding: 10px; text-align: left; }
.policy-modal-body th, .confirm-table th { background: #f0f0f0; width: 35%; text-align: left; }
.confirm-sub-title { background: #f0f0f0; padding: 8px 15px; font-weight: bold; margin: 20px 0 10px; border-left: 4px solid var(--color-primary); }
@media (max-width: 600px) { .confirm-footer { flex-direction: column-reverse; } .confirm-footer button { width: 100%; margin-bottom: 10px; } }

/* =========================================
   8. シュトーレン特設バナー
   ========================================= */
.promo-section { max-width: 1000px; margin: -40px auto 60px; position: relative; z-index: 5; padding: 0 20px; }
.promo-box { background-color: #fff; border: 2px solid #8D6E63; border-radius: 8px; padding: 30px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.15); background-image: linear-gradient(to bottom right, #fff, #fffbf5); }
.promo-badge { display: inline-block; background-color: #c62828; color: #fff; font-size: 0.85rem; font-weight: bold; padding: 4px 15px; border-radius: 20px; margin-bottom: 15px; letter-spacing: 0.05em; }
.promo-title { font-size: 1.6rem; color: #333; margin-bottom: 10px; font-weight: bold; }
.promo-text { font-size: 0.95rem; color: #666; margin-bottom: 25px; line-height: 1.6; }
.btn-promo { display: inline-block; background-color: #8D6E63; color: #fff; padding: 12px 40px; border-radius: 50px; font-weight: bold; text-decoration: none; transition: transform 0.3s, background 0.3s; box-shadow: 0 4px 10px rgba(141, 110, 99, 0.4); }
.btn-promo:hover { background-color: #6d4c41; color: #fff; transform: translateY(-2px); }

/* =========================================
   9. キャンプ・設備ギャラリー (Gallery & Slider)
   ========================================= */
/* フォトギャラリー (自動スクロール) */
.camp-gallery-section { background-color: #fff; padding: 60px 0; overflow: hidden; }
.gallery-marquee { display: flex; width: max-content; }
.gallery-track { display: flex; gap: 20px; animation: scroll-left 80s linear infinite; }
.gallery-track:hover { animation-play-state: paused; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.gallery-item { width: 300px; height: 400px; flex-shrink: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.15); transition: transform 0.3s; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* 設備スライドショー */
.facility-slider { position: relative; max-width: 800px; height: 500px; margin: 0 auto 20px; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); background: #f0f0f0; }
.facility-slide { display: none; height: 100%; width: 100%; }
.facility-slide.active { display: block; animation: fade 0.5s; }
@keyframes fade {from {opacity: .4} to {opacity: 1}}
.facility-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-dots { display: flex; justify-content: center; gap: 12px; margin-top: 20px; padding-bottom: 20px; }
.dot { cursor: pointer; height: 14px; width: 14px; background-color: #ccc; border-radius: 50%; transition: background-color 0.3s ease; }
.dot.active, .dot:hover { background-color: var(--color-primary); }

/* =========================================
   10. 追従型予約ボタン (Floating Button)
   ========================================= */
.floating-reserve {
    position: fixed; bottom: 30px; right: 30px; z-index: 99990;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s ease;
}
.floating-reserve.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-float {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    width: 80px; height: 80px; background-color: var(--color-accent); color: #fff;
    border-radius: 50%; text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-weight: bold; font-size: 0.75rem; line-height: 1.3;
    transition: transform 0.3s, background 0.3s;
    text-align: center; padding-top: 2px;
}
.btn-float:hover { background-color: #d65a3b; transform: scale(1.05); color: #fff; }
.btn-float span { font-size: 1.4rem; margin-bottom: 2px; display: block; line-height: 1; }

/* FAQボタン */
.btn-faq-link {
    display: inline-block; background-color: #fff; color: var(--color-primary);
    border: 2px solid var(--color-primary); padding: 10px 25px; border-radius: 30px;
    text-decoration: none; font-weight: bold; transition: all 0.3s;
}
.btn-faq-link:hover { background-color: #f0f8f0; }

/* =========================================
   11. その他調整 (Map, Calendar Note etc.)
   ========================================= */
.camp-map-img {
    width: 100% !important; max-width: 800px !important;
    height: auto !important; display: block !important; margin: 0 auto !important;
    border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.calendar-price {
    display: block; font-size: 0.75em; color: #555; margin-top: 2px; line-height: 1.2; white-space: nowrap;
}
.calendar-note {
    font-size: 0.85rem; color: #666; margin-top: 10px; margin-bottom: 40px; line-height: 1.5; text-align: left;
}

/* --- 夏季特別規定アラート --- */
.summer-policy-alert {
    margin-top: 10px; margin-bottom: 20px; padding: 15px;
    background-color: #fff4f4; border: 2px solid #ff5252; color: #d32f2f;
    border-radius: 4px; font-size: 0.9rem; line-height: 1.6;
    animation: fadeIn 0.5s ease;
}

@media (max-width: 768px) {
    .promo-section { margin-top: -30px; margin-bottom: 40px; }
    .promo-title { font-size: 1.3rem; }
    .gallery-item { width: 260px; height: 350px; }
    .facility-slider { height: 300px; }
    
    /* 追従ボタン スマホ調整 (reCAPTCHA避け) */
    .floating-reserve { bottom: 90px !important; right: 15px !important; }
    .btn-float { width: 65px; height: 65px; font-size: 0.65rem; }
    .btn-float span { font-size: 1.2rem; }
    
    .calendar-price { display: none !important; }

    /* ★ヘッダー予約ボタン微調整 (中央揃え) */
    .header-cta .btn-reserve {
        display: flex; justify-content: center; align-items: center;
        padding: 8px 12px; font-size: 0.8rem; min-height: 36px; line-height: 1.2; width: auto;
    }
}

/* =========================================
   12. フェードインアニメーション (Animation)
   ========================================= */
/* ★追加したアニメーションCSS */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.5s ease-out forwards;
}
.delay-04 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* reCAPTCHAバッジを非表示 */
.grecaptcha-badge { 
    visibility: hidden; 
}



/* -------------------------------------------------
   同意チェックボックスを中央寄せにする設定
   ------------------------------------------------- */

/* Contact Form 7 の承諾確認ボックスのラッパーをターゲットにする */
.wpcf7-acceptance {
    display: block; /* ブロック要素にして幅を持たせる */
    text-align: center; /* インライン要素(チェックボックス+文字)を中央に */
    margin: 20px auto; /* 上下に余白、左右は自動で中央揃え */
}

/* チェックボックス本体とラベルの配置調整 */
.wpcf7-acceptance label {
    display: inline-flex; /* フレックスボックスで横並び */
    align-items: center; /* 垂直方向の中央揃え */
    justify-content: center; /* 水平方向の中央揃え */
    gap: 8px; /* チェックボックスと文字の間隔 */
    cursor: pointer; /* マウスカーソルを指マークに */
}

/* チェックボックス自体のスタイル微調整 */
.wpcf7-acceptance input[type="checkbox"] {
    margin: 0; /* デフォルトのマージンをリセット */
    width: 18px; /* 少し大きくして押しやすく */
    height: 18px;
    cursor: pointer;
}

/* 同意文言のスタイル */
.wpcf7-acceptance span.wpcf7-list-item-label {
    font-size: 1rem; /* 文字サイズ */
    font-weight: bold; /* 太字で見やすく */
    color: #333;
}

/* --- 日付入力欄の手動入力禁止 --- */
.wpcf7 input.disable-input {
    pointer-events: none;       /* クリックを無効化 */
    background-color: #f9f9f9;  /* 薄いグレーにして入力不可っぽく見せる */
    color: #333;                /* 文字は読みやすく */
    cursor: default;
    border: 1px solid #ddd;
}