/* ==============================================================================
   Krāsotājs.pro - EU GDPR / ePrivacy Cookie Consent Module Styles
   ============================================================================== */

/* Floating Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 580px;
    background: rgba(23, 34, 77, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
    padding: 24px;
    z-index: 9999990;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

#cookie-consent-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(253, 93, 20, 0.2);
    color: #FD5D14;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cookie-banner-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.cookie-banner-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 18px;
}

.cookie-banner-text a {
    color: #FD5D14;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-banner-text a:hover {
    color: #ff8142;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cookie-banner-actions .btn {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.cookie-btn-accept-all {
    background-color: #FD5D14 !important;
    border-color: #FD5D14 !important;
    color: #ffffff !important;
}

.cookie-btn-accept-all:hover {
    background-color: #e04a05 !important;
    border-color: #e04a05 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 93, 20, 0.4);
}

.cookie-btn-necessary {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.cookie-btn-necessary:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.cookie-btn-settings {
    background-color: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    text-decoration: underline;
}

.cookie-btn-settings:hover {
    color: #ffffff !important;
}

/* Floating Reopen Badge Button */
#cookie-settings-badge {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #17224D;
    color: #FD5D14;
    border: 2px solid rgba(253, 93, 20, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999980;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.85;
}

#cookie-settings-badge:hover {
    transform: scale(1.12) rotate(15deg);
    opacity: 1;
    background: #FD5D14;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 24px rgba(253, 93, 20, 0.5);
}

/* Cookie Settings Modal */
#cookie-modal .modal-content {
    background: #17224D;
    color: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

#cookie-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 28px;
}

#cookie-modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#cookie-modal .modal-body {
    padding: 24px 28px;
    max-height: 65vh;
    overflow-y: auto;
}

#cookie-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cookie-category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.cookie-category-card:hover {
    border-color: rgba(253, 93, 20, 0.3);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-category-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0;
}

/* Custom Switch for categories */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    margin: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #FD5D14;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #2b7a4b;
}

.cookie-badge-always {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(43, 122, 75, 0.35);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    #cookie-consent-banner {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 18px;
        max-width: 100%;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-banner-actions .btn {
        width: 100%;
        text-align: center;
    }

    #cookie-settings-badge {
        bottom: 16px;
        left: 16px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    #cookie-modal .modal-footer {
        flex-direction: column;
    }

    #cookie-modal .modal-footer .btn {
        width: 100%;
    }
}
