/* ============================================
   COOKIE CONSENT BANNER & MODAL STYLES
   For Keidal LLP Website
   ============================================ */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    border-top: 3px solid #3b82f6;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

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

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.cookie-link {
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-link:hover {
    color: #dbeafe;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.cookie-btn-accept {
    background: #10b981;
    color: white;
}

.cookie-btn-accept:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.cookie-btn-reject {
    background: #6b7280;
    color: white;
}

.cookie-btn-reject:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.cookie-btn-settings {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.cookie-btn-secondary {
    background: #3b82f6;
    color: white;
}

.cookie-btn-secondary:hover {
    background: #2563eb;
}

/* Cookie Settings Modal */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-modal-header h2 {
    margin: 0;
    color: #1e3a8a;
    font-size: 24px;
}

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

.cookie-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.cookie-modal-close:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

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

.cookie-modal-body > p {
    margin: 0 0 24px 0;
    color: #4b5563;
    line-height: 1.6;
}

.cookie-category {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: #3b82f6;
}

.cookie-category-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 4px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-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);
}

input:checked + .cookie-slider {
    background-color: #10b981;
}

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

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-required {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

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

.cookie-category-info details {
    margin-top: 8px;
}

.cookie-category-info summary {
    cursor: pointer;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cookie-category-info summary:hover {
    color: #2563eb;
    text-decoration: underline;
}

.cookie-category-info ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: #6b7280;
    font-size: 13px;
}

.cookie-category-info li {
    margin-bottom: 4px;
}

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

/* Contact Info Box in Privacy Page */
.contact-info-box {
    background: #f3f4f6;
    border-left: 4px solid #3b82f6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.contact-info-box p {
    margin: 8px 0;
}

/* Last Updated Date */
.last-updated {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin: 20px 0;
    font-size: 14px;
}

/* Back Link */
.back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.back-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-consent-buttons {
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .cookie-modal-header {
        padding: 16px;
    }
    
    .cookie-modal-body {
        padding: 16px;
    }
    
    .cookie-modal-footer {
        padding: 16px;
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 16px;
    }
    
    .cookie-consent-text h3 {
        font-size: 16px;
    }
    
    .cookie-consent-text p {
        font-size: 13px;
    }
    
    .cookie-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .cookie-modal-header h2 {
        font-size: 20px;
    }
}

/* Print Styles - Hide Cookie Elements */
@media print {
    .cookie-consent-banner,
    .cookie-modal {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 5px solid white;
    }
    
    .cookie-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-btn,
    .cookie-slider,
    .cookie-slider:before {
        transition: none;
        animation: none;
    }
}
