/**
 * CheckSec Cookie Consent Styles
 * Minimalist, professional styling for cookie consent banner and modal
 */

/* Cookie Banner (Bottom Bar) */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(6, 40, 61, 0.98); /* CheckSec Primary with slight transparency */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.cookie-banner-hide {
    transform: translateY(100%);
}

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

.cookie-banner-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.cookie-link {
    color: #1b98e0; /* CheckSec Secondary */
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.cookie-link:hover {
    color: #47b5ff; /* CheckSec Secondary Hover */
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.cookie-modal.cookie-modal-hide {
    opacity: 0;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
}

.cookie-modal.cookie-modal-hide .cookie-modal-content {
    transform: scale(0.95);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.cookie-modal-header h2 {
    margin: 0;
    color: #06283d; /* CheckSec Primary */
    font-size: 20px;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.cookie-modal-close:hover {
    background: #f3f4f6;
    color: #06283d;
}

.cookie-modal-body {
    padding: 0 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-modal-intro {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-category h3 {
    margin: 0 0 4px 0;
    color: #06283d;
    font-size: 16px;
    font-weight: 600;
}

.cookie-category p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-toggle-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 12px;
    transition: 0.3s ease-in-out;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #1b98e0; /* CheckSec Secondary */
}

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

.cookie-toggle:hover .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(27, 152, 224, 0.1);
}

.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Buttons */
.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    outline: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background: rgb(29, 188, 96, 1); /* CheckSec Secondary */
    color: white;
    border-color: rgb(29, 188, 96, 0.4);
}

.cookie-btn-primary:hover {
    background: rgb(29, 188, 96, 1); /* CheckSec Secondary Hover */
    border-color: rgb(29, 188, 96, 0.9);
}

.cookie-btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(27, 152, 224, 0.2);
}

.cookie-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.cookie-btn-text {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 8px 12px;
}

.cookie-btn-text:hover {
    background: #f3f4f6;
    color: #06283d;
}

.cookie-btn-reject {
    background: rgba(209,66,73, 0.9);
    color: rgba(255,255,255, 0.9);
    border-color: rgba(209,66,73, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(209,66,73, 1);
    color: rgba(255,255,255, 0.9);
    border-color: rgba(209,66,73, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }
    
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-modal {
        padding: 16px;
    }
    
    .cookie-modal-content {
        max-height: 90vh;
    }
    
    .cookie-modal-header {
        padding: 20px 20px 0;
    }
    
    .cookie-modal-body {
        padding: 0 20px;
    }
    
    .cookie-modal-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-toggle {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .cookie-banner-actions {
        flex-direction: column;
    }
    
    .cookie-modal-header h2 {
        font-size: 18px;
    }
    
    .cookie-category {
        padding: 12px;
    }
}