/* ======================================
   WELION COOKIE MANAGER V2 - CSS STYLES
   ====================================== */

/* Cookie Banner Styles */
#welion-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.welion-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.welion-cookie-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.welion-cookie-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #fbbf24;
}

.welion-cookie-text p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.welion-cookie-text a {
    color: #fbbf24;
    text-decoration: underline;
}

.welion-cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.welion-cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

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

.btn-accept-all:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-necessary-only {
    background: #6b7280;
    color: white;
}

.btn-necessary-only:hover {
    background: #4b5563;
}

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

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

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    color: #1f2937;
    padding: 0;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.cookie-modal-header h3 {
    color: #1e40af;
    margin: 0;
    font-size: 1.5rem;
}

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

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

.cookie-modal-body {
    padding: 1rem 2rem;
    max-height: 50vh;
    overflow-y: auto;
}

.cookie-modal-body p {
    margin-bottom: 1.5rem;
    color: #6b7280;
    line-height: 1.6;
}

.cookie-category-setting {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

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

.cookie-category-setting h4 {
    color: #1f2937;
    margin: 0;
    font-size: 1.1rem;
}

.cookie-category-setting p {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Toggle Switch Styles */
.cookie-toggle {
    position: relative;
    display: inline-block;
}

.cookie-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

input:checked + .toggle-slider {
    background-color: #059669;
}

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

input:disabled + .toggle-slider {
    background-color: #059669;
    opacity: 0.7;
    cursor: not-allowed;
}

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

.btn-primary {
    background: #1e40af;
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
}

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

.btn-secondary:hover {
    background: #4b5563;
}

/* Notification Styles */
.welion-cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10003;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.welion-cookie-notification.show {
    transform: translateX(0);
}

.welion-cookie-notification-success {
    background: #059669;
}

.welion-cookie-notification-info {
    background: #1e40af;
}

.welion-cookie-notification-warning {
    background: #ea580c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welion-cookie-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .welion-cookie-buttons {
        justify-content: center;
    }
    
    .welion-cookie-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .cookie-modal {
        padding: 1rem;
    }

    .cookie-modal-content {
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .cookie-modal-body {
        padding: 1rem 1.5rem;
    }

    .cookie-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column;
    }

    .cookie-category-setting {
        padding: 1rem;
    }

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

    .welion-cookie-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    #welion-cookie-banner {
        padding: 1rem;
    }

    .welion-cookie-text {
        font-size: 0.9rem;
    }

    .welion-cookie-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .cookie-modal-header h3 {
        font-size: 1.3rem;
    }

    .toggle-slider {
        width: 40px;
        height: 20px;
    }

    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

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

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .cookie-modal-content {
        background: #1f2937;
        color: white;
    }

    .cookie-modal-header {
        border-bottom-color: #374151;
    }

    .cookie-modal-body {
        border-top-color: #374151;
    }

    .cookie-modal-footer {
        border-top-color: #374151;
    }

    .cookie-category-setting {
        background: #111827;
        border-color: #374151;
    }

    .cookie-category-setting h4 {
        color: white;
    }

    .cookie-category-setting p {
        color: #d1d5db;
    }

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