/**
 * Cookie Consent Banner Styles
 * Urdu2Korean - MS TECH IT Pvt Ltd
 */

/* Banner Container - Compact Bottom Right */
#cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    max-width: 420px;
    transform: translateX(500px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#cookie-consent-banner.show {
    transform: translateX(0);
}

.cookie-consent-overlay {
    display: none; /* No overlay for compact design */
}

.cookie-consent-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

/* Content */
.cookie-consent-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem 0;
}

.cookie-description {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.cookie-description-urdu {
    display: none; /* Hide Urdu text in compact mode */
}

/* Actions */
.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 1;
}

.cookie-btn-icon {
    width: 1rem;
    height: 1rem;
}

.cookie-btn-accept {
    background: #10b981;
    color: white;
}

.cookie-btn-accept:hover {
    background: #059669;
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.cookie-btn-reject:hover {
    background: #e2e8f0;
    color: #475569;
}

.cookie-btn-settings {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    flex: 0;
}

.cookie-btn-settings:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cookie-btn-primary {
    background: #3b82f6;
    color: white;
}

.cookie-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Links */
.cookie-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    justify-content: center;
}

.cookie-links a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.cookie-links a:hover {
    text-decoration: underline;
}

.cookie-links span {
    color: #cbd5e1;
}

/* Settings Modal */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cookie-settings-modal.show {
    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(4px);
}

.cookie-modal-container {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.cookie-category p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    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: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #10b981;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
    justify-content: center;
    padding: 0.65rem 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    #cookie-consent-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .cookie-consent-container {
        padding: 1rem;
    }

    .cookie-title {
        font-size: 0.95rem;
    }

    .cookie-description {
        font-size: 0.75rem;
    }

    .cookie-btn {
        font-size: 0.75rem;
        padding: 0.45rem 0.85rem;
    }

    .cookie-modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-btn-settings {
        flex: 1;
    }
}
