/**
 * Sticky CTA Bar Styles
 * 全ページ共通のスクロール追従CTAバー
 */

/* ===========================
   スティッキーCTAバー
   =========================== */

.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(30, 33, 48, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(78, 205, 196, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.5rem;
    z-index: 998;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.sticky-cta-bar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sticky-cta-bar.hidden-by-user {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

/* テキスト部分 */
.sticky-cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sticky-cta-text .sticky-cta-icon {
    font-size: 1.1rem;
}

/* CTAボタン */
.sticky-cta-bar .sticky-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.4rem;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(255, 107, 157, 0.4);
}

.sticky-cta-bar .sticky-cta-button:hover {
    background: linear-gradient(135deg, #ff7dab, #d65076);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(255, 107, 157, 0.5);
}

.sticky-cta-bar .sticky-cta-button i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.sticky-cta-bar .sticky-cta-button:hover i {
    transform: translateX(2px);
}

/* 閉じるボタン */
.sticky-cta-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sticky-cta-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   インラインCTAセクション
   =========================== */

.inline-cta-section {
    text-align: center;
    padding: 3rem 5%;
    margin: 2rem auto;
    max-width: 900px;
    background: linear-gradient(135deg, #f0fffe, #fff5f8);
    border-radius: 20px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.inline-cta-section .inline-cta-lead {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.inline-cta-section .inline-cta-lead .inline-cta-emoji {
    font-size: 1.3rem;
}

.inline-cta-section .cta-button {
    font-size: 1.05rem;
    padding: 0.9rem 2.2rem;
}

/* 信頼性バッジ */
.cta-trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cta-trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #888;
    font-size: 0.85rem;
}

.cta-trust-badges .badge i {
    color: #4ecdc4;
    font-size: 0.85rem;
}

/* ===========================
   フッターCTAセクション
   =========================== */

.footer-cta-section {
    text-align: center;
    padding: 4rem 5%;
    margin: 0;
    background: linear-gradient(180deg, rgba(30, 33, 48, 0.95), rgba(20, 22, 35, 0.98));
    border-top: 1px solid rgba(78, 205, 196, 0.15);
}

.footer-cta-section h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.footer-cta-section .footer-cta-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.footer-cta-section .cta-trust-badges .badge {
    color: rgba(255, 255, 255, 0.6);
}

.footer-cta-section .footer-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-cta-section .cta-button {
    font-size: 1.05rem;
    padding: 0.9rem 2rem;
}

/* ===========================
   レスポンシブ対応
   =========================== */

/* タブレット */
@media (max-width: 1023px) {
    .sticky-cta-bar {
        height: 56px;
        gap: 0.8rem;
        padding: 0 1rem;
    }

    .sticky-cta-text {
        font-size: 0.85rem;
    }

    .sticky-cta-bar .sticky-cta-button {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* モバイル */
@media (max-width: 767px) {
    .sticky-cta-bar {
        height: 56px;
        gap: 0.6rem;
        padding: 0 0.8rem;
        padding-right: 2.5rem;
    }

    .sticky-cta-text {
        font-size: 0.8rem;
        display: none; /* モバイルではテキスト非表示、ボタンのみ */
    }

    .sticky-cta-bar .sticky-cta-button {
        padding: 0.6rem 1.4rem;
        font-size: 0.9rem;
        flex: 1;
        justify-content: center;
    }

    .sticky-cta-close {
        right: 8px;
    }

    /* インラインCTA */
    .inline-cta-section {
        padding: 2rem 4%;
        margin: 1.5rem 0;
    }

    .inline-cta-section .inline-cta-lead {
        font-size: 0.95rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .cta-trust-badges {
        gap: 0.8rem;
    }

    .cta-trust-badges .badge {
        font-size: 0.8rem;
    }

    /* フッターCTA */
    .footer-cta-section {
        padding: 3rem 4%;
    }

    .footer-cta-section h2 {
        font-size: 1.4rem;
    }

    .footer-cta-section .footer-cta-subtitle {
        font-size: 0.95rem;
    }

    .footer-cta-section .footer-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-cta-section .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

/* 小さいモバイル */
@media (max-width: 480px) {
    .sticky-cta-bar {
        height: 52px;
    }

    .sticky-cta-bar .sticky-cta-button {
        font-size: 0.85rem;
        padding: 0.55rem 1.2rem;
    }
}

/* ===========================
   ビデオポップアップとの干渉回避
   =========================== */

/* ビデオポップアップが表示されている場合のスティッキーバー調整 */
.video-mini-popup.visible ~ .sticky-cta-bar.visible,
body:has(.video-mini-popup.visible) .sticky-cta-bar.visible {
    /* ビデオポップアップは右下に配置されるので、スティッキーバーは全幅で下に表示 */
    /* ビデオポップアップが上にくるのでz-indexで解決済み（ビデオ: 1000, スティッキー: 998） */
}

/* ===========================
   アクセシビリティ
   =========================== */

/* タッチデバイス用 */
@media (hover: none) {
    .sticky-cta-bar .sticky-cta-button:hover {
        transform: none;
    }
}

/* ハイコントラストモード */
@media (prefers-contrast: high) {
    .sticky-cta-bar {
        background: rgba(0, 0, 0, 0.95);
        border-top: 2px solid white;
    }
}

/* アニメーション削減モード */
@media (prefers-reduced-motion: reduce) {
    .sticky-cta-bar,
    .sticky-cta-bar .sticky-cta-button {
        transition: none;
    }
}
