/* ==========================================================================
   Sticky CTA - Fixed Bottom Bar
   ========================================================================== */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #666666;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta.hidden {
    transform: translateY(100%);
}

.sticky-cta-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.sticky-cta-message {
    flex: 0 0 auto;
}

.sticky-cta-label {
    display: inline-block;
    background: transparent;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin: 0;
    letter-spacing: 0.05em;
}

.sticky-cta-label .br-mobile {
    display: none;
}

.sticky-cta-text {
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.sticky-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.sticky-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.sticky-cta-btn svg {
    flex-shrink: 0;
}

.sticky-cta-btn-primary {
    background: #FF6B35;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sticky-cta-btn-primary:hover {
    background: #FF8555;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.sticky-cta-btn-primary span {
    color: #FFFFFF !important;
}

.sticky-cta-btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sticky-cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    text-decoration: none;
}

.sticky-cta-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
    display: none; /* 初期状態では非表示 */
}

.sticky-cta-close:hover {
    color: #FFFFFF;
    transform: rotate(90deg);
}

/* スクロール時の表示制御用クラス */
.sticky-cta.scrolled-up {
    transform: translateY(0);
}

.sticky-cta.scrolled-down {
    transform: translateY(100%);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 968px) {
    .sticky-cta-inner {
        flex-wrap: nowrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .sticky-cta-message {
        flex: 0 1 auto;
        text-align: left;
    }

    .sticky-cta-label {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
    }

    .sticky-cta-actions {
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .sticky-cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 40px;
        white-space: nowrap;
    }

    .sticky-cta-close {
        display: none;
    }
}

@media (max-width: 640px) {
    .sticky-cta-inner {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .sticky-cta-label {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }

    .sticky-cta-label .br-mobile {
        display: inline;
    }

    .sticky-cta-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.75rem;
        border-radius: 35px;
    }

    .sticky-cta-btn span {
        font-size: 0.75rem;
    }

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

/* Footer余白調整（CTAバーの高さ分） */
body {
    padding-bottom: 80px; /* CTAバーの高さ分 */
}

@media (max-width: 968px) {
    body {
        padding-bottom: 50px; /* モバイルでの2行分の高さ */
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 50px; /* モバイルでの縦並び時の高さ */
    }
}
