/*
=======================================================================
onsen-footer.css - フッター・モバイルUX改善スタイル
=======================================================================
*/

/* ========================
   フッターのスタイル
======================== */
.site-footer {
    background: linear-gradient(135deg, var(--onsen-primary) 0%, var(--onsen-wood) 100%);
    color: rgba(255, 248, 220, 0.9);
    margin-top: 50px;
    padding: 50px 0 20px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--onsen-warm), #ffd700, var(--onsen-accent));
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    min-width: 0;
}

.footer-title {
    color: var(--onsen-warm);
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--onsen-accent);
    padding-bottom: 8px;
}

.footer-description {
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.footer-social {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    background: rgba(255, 248, 220, 0.1);
    color: var(--onsen-paper);
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
    border: 1px solid rgba(255, 248, 220, 0.2);
}

.social-link:hover {
    background: var(--onsen-warm);
    color: var(--onsen-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 248, 220, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    padding: 5px 0;
    display: block;
}

.footer-links a:hover {
    color: var(--onsen-warm);
    text-decoration: none;
    padding-left: 10px;
}

.contact-info {
    margin-bottom: 20px;
    font-size: 0.95em;
}

.contact-info p {
    margin-bottom: 8px;
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 248, 220, 0.3);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    flex: 1;
    min-width: 250px;
}

.footer-copyright p {
    margin-bottom: 5px;
    font-size: 0.9em;
    opacity: 0.8;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255, 248, 220, 0.7);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--onsen-warm);
    text-decoration: none;
}

/* ========================
   モバイルUX改善CSS
======================== */

.mobile-footer-nav,
.floating-actions {
    display: block !important;
}

/* 固定フッターナビゲーション（スマホのみ） */
.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--onsen-primary), var(--onsen-accent));
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--onsen-warm);
    z-index: 9999;
    display: none;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    max-width: 500px;
    margin: 0 auto;
    /*padding: 8px 5px 20px; /* 下部にiPhone用の余白 */
    padding: 8px 5px 10px; /* 下部にiPhone用の余白 */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0 2px;
}

.nav-item:hover,
.nav-item:active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: bold;
    line-height: 1.1;
    text-align: center;
}

/* フローティングアクションボタン群 */
.floating-actions {
    position: fixed;
    right: 15px;
    bottom: 100px; /* フッターナビの上に配置 */
    z-index: 9998;
    display: none;
}

.fab-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-primary {
    background: linear-gradient(45deg, var(--onsen-wood), var(--onsen-accent));
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
}

.fab-secondary {
    background: linear-gradient(45deg, var(--onsen-primary), var(--onsen-wood));
    width: 45px;
    height: 45px;
    font-size: 1rem;
}

.fab-btn.fab-secondary {
        /* 薄い茶色のグラデーション */
    /* 適度な濃さの茶色（アイコンが見やすい） */
    background: linear-gradient(45deg, var(--onsen-warm), var(--onsen-wood));
    font-size: 1.3rem !important; /* 🎥を特大に */
    width: 50px !important; /* ボタンも大きく */
    height: 50px !important;
}

.fab-btn:hover,
.fab-btn:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* トップに戻るボタン */
.back-to-top {
    position: fixed;
    right: 15px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--onsen-primary), var(--onsen-accent));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9997;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* クイックアクションモーダル */
/* 🎯 統一版：CSS変数を使ったモーダル制御 */
:root {
    --mobile-nav-height: 80px; /* JavaScript で動的に設定 */
}

/* スマホ用モーダル */
.quick-action-modal {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(100%); /* 初期状態：下に隠れる */
    background: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    width: 90%;
    max-width: 400px;
    max-height: 75vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); /*表示速度*/
    border: 3px solid #cd853f;
    border-bottom: none;
}

.quick-action-modal.show {
    transform: translateX(-50%) translateY(0); /* 表示状態：正常位置 */
    opacity: 1 !important;
    visibility: visible !important;
}



/* 🎯 最終修正：PC版モーダル（確実に適用される） */

/* IDとクラスの組み合わせで最高の優先度 */
@media (min-width: 769px) {
    #quickActionModal.quick-action-modal {
        position: fixed;
        top: 20px;
        right: -380px;
        bottom: auto;
        left: auto;
        transform: none;
        width: 360px;
        max-width: 360px;
        max-height: 80vh;
        border-radius: 12px 0 0 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.15);
        transition: right 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
        border: 1px solid #ddd;
        border-right: none;
        
        /* 🔧 追加：スマホ用プロパティを強制リセット */
        margin: 0;
        --mobile-nav-height: 0;
    }
    
    #quickActionModal.quick-action-modal.show {
        right: 0;
        left: auto;
        transform: none;
        bottom: auto;
        top: 20px;
        opacity: 1;
        visibility: visible;
        
        /* 🔧 追加：showでもリセット */
        margin: 0;
    }
}


/* モーダル背景 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease; /*表示速度*/
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 残りのスタイルは既存のものをそのまま使用 */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--onsen-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    max-height: none;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    text-decoration: none;
    color: var(--onsen-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-action-item:hover {
    background: linear-gradient(135deg, var(--onsen-primary), var(--onsen-accent));
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
    border-color: var(--onsen-warm);
}

/* モーダル内のアイコンとテキストサイズ調整 */

.quick-action-icon {
    font-size: 2.5rem !important;  /* 元: 2rem → 2.5rem に拡大 */
    margin-bottom: 10px !important; /* アイコンとテキストの間隔も調整 */
}

.quick-action-label {
    font-size: 0.75rem !important; /* 元: 0.9rem → 0.75rem に縮小 */
    font-weight: bold;
    text-align: center;
    line-height: 1.2; /* 行間も調整 */
}

/* さらに大きくしたい場合の選択肢 */
/*
.quick-action-icon {
    font-size: 3rem !important;    // 超大きめ
    margin-bottom: 12px !important;
}

.quick-action-label {
    font-size: 0.7rem !important;  // 超小さめ
}
*/

/* スマホでの追加調整 */
@media (max-width: 480px) {
    .quick-action-icon {
        font-size: 2rem !important; /* スマホではやや控えめ */
        margin-bottom: 8px !important;
    }
    
    .quick-action-label {
        font-size: 0.9rem !important; /* スマホでさらに小さく */
    }
}



/**********************************/
/* QRコードボタン - PC専用・全幅配置 */
.qr-full-width {
    grid-column: 1 / -1;
    margin-top: 8px;
}

/* スマホでは非表示 */
@media (max-width: 768px) {
    .qr-full-width {
        display: none;
    }
}

/* QRコードモーダル */
.qr-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.qr-modal.active {
    right: 0;
}

.qr-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.qr-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qr-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.qr-modal-content {
    padding: 30px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.qr-code-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.qr-code-canvas {
    display: block;
}

.qr-instructions {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 280px;
}

.qr-instructions h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.qr-url-display {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #495057;
    word-break: break-all;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qr-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .qr-modal {
        width: 350px;
        right: -350px;
    }
}

@media (max-width: 768px) {
    .qr-modal {
        display: none;
    }
}