/**
 * VP Internationals - Cookie Consent Styles
 * 
 * Standalone CSS file for cookie consent banner and modal
 * Can be loaded separately for better caching
 * 
 * @package    VPInternationals
 * @author     VP Internationals
 * @copyright  2024 Parshwanth Formatting (OPC) Private Limited
 */

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    padding: 20px;
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent.hiding {
    animation: cookieSlideDown 0.3s ease-out forwards;
}

@keyframes cookieSlideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.cookie-icon {
    color: #95C11F;
    flex-shrink: 0;
}

.cookie-text h4 {
    margin: 0 0 8px 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1E3A5F;
}

.cookie-text p {
    margin: 0 0 6px 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
}

.cookie-link {
    font-size: 13px;
    color: #95C11F;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: #7BA019;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ============================================
   COOKIE BUTTONS
   ============================================ */

.btn-cookie {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-settings {
    background: transparent;
    border: 2px solid #D1D5DB;
    color: #1E3A5F;
}

.btn-settings:hover {
    border-color: #1E3A5F;
    background: #1E3A5F;
    color: #ffffff;
}

.btn-reject {
    background: #E9ECF0;
    color: #4B5563;
}

.btn-reject:hover {
    background: #D1D5DB;
}

.btn-accept {
    background: linear-gradient(135deg, #95C11F 0%, #7BA019 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(149, 193, 31, 0.3);
}

.btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(149, 193, 31, 0.4);
}

.btn-save {
    background: #1E3A5F;
    color: #ffffff;
    width: 100%;
}

.btn-save:hover {
    background: #162D4A;
}

/* ============================================
   COOKIE MODAL
   ============================================ */

.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: cookieFadeIn 0.3s ease;
}

@keyframes cookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: cookieModalSlideIn 0.3s ease;
}

@keyframes cookieModalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #E9ECF0;
}

.cookie-modal-header h4 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1E3A5F;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    background: #F5F7FA;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: #E9ECF0;
    color: #1E3A5F;
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

/* ============================================
   COOKIE CATEGORIES
   ============================================ */

.cookie-category {
    padding: 20px 0;
    border-bottom: 1px solid #E9ECF0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h5 {
    margin: 0 0 8px 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1E3A5F;
}

.cookie-category-info p {
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #6B7280;
    line-height: 1.6;
}

.cookie-category-toggle {
    flex-shrink: 0;
}

.toggle-always-on {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #95C11F;
    background: #E8F5E9;
    padding: 6px 12px;
    border-radius: 6px;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D1D5DB;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #95C11F 0%, #7BA019 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(149, 193, 31, 0.2);
}

/* ============================================
   MODAL FOOTER
   ============================================ */

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #E9ECF0;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .cookie-consent {
        padding: 16px;
    }
    
    .cookie-consent-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-cookie {
        width: 100%;
    }
    
    .cookie-modal {
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .cookie-modal-header {
        padding: 20px;
    }
    
    .cookie-modal-body {
        padding: 20px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .cookie-category-toggle {
        align-self: flex-start;
    }
    
    .cookie-modal-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .cookie-text h4 {
        font-size: 15px;
    }
    
    .cookie-text p {
        font-size: 13px;
    }
    
    .btn-cookie {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .cookie-modal-header h4 {
        font-size: 18px;
    }
}

/* ============================================
   PRINT STYLES - HIDE COOKIE BANNER
   ============================================ */

@media print {
    .cookie-consent,
    .cookie-modal-overlay {
        display: none !important;
    }
}