/* ===========================================
   COOKIE CONSENT BANNER - Ensura AI Design
   =========================================== */

/* Banner Container */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner.hidden {
    transform: translateY(100%);
    pointer-events: none;
}

/* Inner Container */
.cookie-banner-inner {
    background: linear-gradient(135deg, rgba(13, 26, 45, 0.98), rgba(10, 14, 26, 0.99));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    padding: 1.5rem 2rem;
    max-width: 100%;
}

/* Layout */
.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Header */
.cookie-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-icon {
    font-size: 1.75rem;
}

.cookie-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Text */
.cookie-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-text a {
    color: #10b981;
    text-decoration: none;
    transition: color 0.2s;
}

.cookie-text a:hover {
    color: #34d399;
    text-decoration: underline;
}

/* Options Grid */
.cookie-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

.cookie-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Checkbox */
.cookie-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
}

.cookie-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.cookie-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s;
}

.cookie-checkbox input:checked + .checkmark {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}

.cookie-checkbox .checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cookie-checkbox input:checked + .checkmark::after {
    display: block;
}

.cookie-checkbox input:disabled + .checkmark {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
}

/* Option Labels */
.cookie-option-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cookie-option-label span:first-child {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
}

.cookie-option-label small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
}

.required-badge {
    font-size: 0.65rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

/* Buttons */
.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.cookie-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.cookie-btn-reject {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cookie-btn-save {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.cookie-btn-save:hover {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Footer Link for reopening settings */
.cookie-settings-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.cookie-settings-link:hover {
    color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-inner {
        padding: 1.25rem 1rem;
    }

    .cookie-content {
        gap: 1rem;
    }

    .cookie-options {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-option {
        width: 100%;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* Mini floating button to reopen */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(13, 26, 45, 0.95), rgba(10, 14, 26, 0.98));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 9998;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.cookie-settings-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    border-color: #10b981;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}
