/**
 * Cookie Consent Banner & Modal Styles
 * GDPR & India IT Act Compliant
 */

/* Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 3px solid #FC4C02;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

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

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

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

.cookie-policy-link:hover {
    color: #d43e00;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-consent-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-accept-all {
    background: #FC4C02;
    color: white;
}

.btn-accept-all:hover {
    background: #d43e00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(252, 76, 2, 0.3);
}

.btn-reject {
    background: #f3f4f6;
    color: #374151;
}

.btn-reject:hover {
    background: #e5e7eb;
}

.btn-customize {
    background: transparent;
    color: #FC4C02;
    border: 1px solid #FC4C02;
}

.btn-customize:hover {
    background: #fff5f0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-actions button {
        width: 100%;
        padding: 12px;
    }
}

/* Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

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

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e5e7eb;
}

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

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

.cookie-category-header h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-category-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cookie-category-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cookie-list {
    margin: 0 0 12px 0;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.cookie-list li {
    margin-bottom: 6px;
}

.cookie-list strong {
    color: #374151;
    font-weight: 600;
}

.cookie-legal-basis {
    margin: 12px 0 0 0;
    padding: 10px;
    background: #f9fafb;
    border-left: 3px solid #FC4C02;
    font-size: 12px;
    color: #374151;
}

/* 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: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

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

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

.cookie-modal-footer button {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-preferences {
    background: #FC4C02;
    color: white;
}

.btn-save-preferences:hover {
    background: #d43e00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(252, 76, 2, 0.3);
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

/* Mobile responsiveness for modal */
@media (max-width: 640px) {
    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 16px;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-modal-footer {
        flex-direction: column-reverse;
    }

    .cookie-modal-footer button {
        width: 100%;
    }
}
