/**
 * Components CSS
 * Загальні стилі для повторюваних компонентів сайту
 */

/* ============================================
   COOKIE NOTICE
   ============================================ */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(15, 17, 21, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-notice.is-visible {
    transform: translateY(0);
}

.cookie-notice__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-notice__text {
    font-family: "Exo 2", "Nunito", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.cookie-notice__link {
    color: #008FFF;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-notice__link:hover {
    color: #0077d6;
}

.cookie-notice__btn {
    flex-shrink: 0;
    padding: 12px 32px;
    border-radius: 8px;
    background: #008FFF;
    color: #fff;
    font-family: "Exo 2", "Nunito", sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 143, 255, 0.3);
}

.cookie-notice__btn:hover {
    background: #0077d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 143, 255, 0.4);
}

.cookie-notice__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 143, 255, 0.3);
}

@media (max-width: 768px) {
    .cookie-notice {
        padding: 16px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .cookie-notice__container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }
    
    .cookie-notice__text {
        font-size: 12px;
        line-height: 1.4;
        text-align: center;
    }

    .cookie-notice__btn {
        width: 100%;
        text-align: center;
        padding: 12px 24px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cookie-notice {
        padding: 12px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .cookie-notice__container {
        gap: 10px;
    }
    
    .cookie-notice__text {
        font-size: 11px;
    }

    .cookie-notice__btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* ============================================
   GRECAPTCHA BADGE
   ============================================ */
.grecaptcha-badge {
    display: none !important;
}

/* ============================================
   PAGE TRANSITIONS (View Transitions API)
   ============================================ */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.2s;
    animation-timing-function: ease-out;
}

::view-transition-old(root) {
    animation-name: fade-out;
}

::view-transition-new(root) {
    animation-name: fade-in;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fallback for browsers without View Transitions */
html {
    scroll-behavior: smooth;
}

body {
    opacity: 1;
    transition: opacity 0.15s ease-out;
}

body.page-transitioning {
    opacity: 0;
}
