/**
 * Cookie Consent Popup Styles
 * GDPR Compliant Design
 */

/* Cookie Consent Overlay */
#cookie-consent-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

#cookie-consent-popup.show {
    opacity: 1;
}

/* Cookie Consent Box */
#cookie-consent-box {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 50px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
}

#cookie-consent-popup.show #cookie-consent-box {
    transform: translateY(0);
}

/* Cookie Consent Header */
#cookie-consent-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

#cookie-consent-header .cookie-icon {
    font-size: 32px;
    flex-shrink: 0;
}

#cookie-consent-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
}

#cookie-consent-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
    flex-shrink: 0;
}

#cookie-consent-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Cookie Consent Content */
#cookie-consent-content {
    padding: 30px;
}

#cookie-consent-content p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: #4b5563;
    font-size: 15px;
}

#cookie-consent-content p:last-child {
    margin-bottom: 0;
}

#cookie-consent-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

#cookie-consent-content a:hover {
    text-decoration: underline;
}

/* Cookie Settings Panel */
#cookie-settings-panel {
    display: none;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.cookie-setting-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    margin-bottom: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.cookie-setting-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.cookie-setting-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-setting-info {
    flex: 1;
}

.cookie-setting-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-setting-info p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #3b82f6;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #e5e7eb;
    cursor: not-allowed;
}

/* Cookie Consent Actions */
#cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
}

#cookie-consent-actions .cookie-btn {
    display: flex;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cookie-btn-primary {
    background: #3b82f6;
    color: white;
}

.cookie-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cookie-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cookie-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.cookie-btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.cookie-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.cookie-btn:active {
    transform: translateY(0);
}

/* Settings Toggle Button */
#cookie-settings-toggle {
    background: transparent;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 15px;
    text-decoration: underline;
    transition: color 0.2s;
}

#cookie-settings-toggle:hover {
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    #cookie-consent-popup {
        padding: 10px;
    }

    #cookie-consent-box {
        margin: 20px auto;
        max-width: 100%;
    }

    #cookie-consent-header {
        padding: 20px;
    }

    #cookie-consent-header h3 {
        font-size: 20px;
    }

    #cookie-consent-content {
        padding: 20px;
    }

    #cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-setting-item {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    #cookie-consent-header {
        flex-wrap: wrap;
    }

    #cookie-consent-header .cookie-icon {
        font-size: 28px;
    }

    #cookie-consent-header h3 {
        font-size: 18px;
    }

    #cookie-consent-content {
        padding: 15px;
    }

    #cookie-consent-content p {
        font-size: 14px;
    }
}

/* Animation for settings panel */
#cookie-settings-panel {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
.cookie-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.cookie-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles - hide cookie consent when printing */
@media print {
    #cookie-consent-popup {
        display: none !important;
    }
}

