/* Cookie Banner and Settings Modal Styles */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary);
}

.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
}

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

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
    line-height: 1.5;
    font-size: 14px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.cookie-btn-primary:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.cookie-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.cookie-btn-link {
    background: transparent;
    color: #94a3b8;
    text-decoration: underline;
    padding: 8px 12px;
}

.cookie-btn-link:hover {
    color: white;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-settings-modal.show {
    opacity: 1;
}

.cookie-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-settings-modal.show .cookie-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

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

.cookie-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f3f4f6;
    color: var(--dark);
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

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

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

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

.cookie-toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.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: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: 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: var(--primary);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

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

/* Cookie Policy Page Styles */
.cookie-policy-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.cookie-policy-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-policy-section h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.cookie-policy-section ul {
    margin: 15px 0;
    padding-left: 20px;
}

.cookie-policy-section li {
    margin-bottom: 8px;
    color: var(--dark);
}

.cookie-policy-section li strong {
    color: var(--accent);
    font-weight: 600;
}

/* Cookie Icons */
.cookie-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-content p {
        min-width: auto;
        font-size: 13px;
    }
    
    .cookie-buttons {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 100px;
        font-size: 12px;
        padding: 8px 16px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .cookie-btn-secondary {
        flex: 0 1 auto;
        min-width: 130px;
        max-width: 140px;
    }
    
    .cookie-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }
    
    .cookie-modal-title {
        font-size: 18px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-toggle {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 12px;
    }
    
    .cookie-content p {
        font-size: 12px;
    }
    
    .cookie-buttons {
        gap: 6px;
    }
    
    .cookie-btn {
        font-size: 11px;
        padding: 8px 12px;
        min-width: 80px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .cookie-btn-secondary {
        flex: 0 1 auto;
        min-width: 110px;
        max-width: 120px;
    }
    
    .cookie-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .cookie-modal-content {
        transform: translate(-50%, -50%) scale(0.95);
    }
    
    .cookie-settings-modal.show .cookie-modal-content {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-banner.show {
    animation: slideUp 0.5s ease-out;
}

/* Focus styles for accessibility */
.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cookie-banner,
    .cookie-settings-modal {
        display: none !important;
    }
}

/* Cookie Settings Link/Button in Footer */
.footer-cookie-settings-link {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.footer-cookie-settings-link:hover {
    color: var(--primary) !important;
    text-decoration: none !important;
}

.footer-cookie-settings-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Ensure button looks like link in footer context */
.footer-bottom .footer-cookie-settings-link {
    display: inline;
    margin: 0;
    vertical-align: baseline;
}
