/* cookie-consent.css */

/* Main cookie bar - appears at the bottom right on desktop */
.cookie-consent-bar {
    position: fixed;
    bottom: 20px;
    right: auto;
    left: 20px;
    max-width: 400px;
    width: calc(100% - 40px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    z-index: 9999;
    padding: 1rem 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-radius: 16px;
}

.cookie-consent-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-direction: column;
}

.cookie-text {
    flex: 3;
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-text p {
    margin: 0;
    color: #e0e0e0;
}

.cookie-text a {
    color: #4CAF50;
    text-decoration: none;
    border-bottom: 1px dashed #4CAF50;
}

.cookie-text a:hover {
    color: #45a049;
}

.cookie-buttons {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.cookie-btn-primary {
    background: #4CAF50;
    color: white;
}

.cookie-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.cookie-btn-secondary {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid #555;
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #888;
}

.cookie-btn-outline {
    background: transparent;
    color: #ccc;
    border: 1px solid #666;
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Modal popup for customization */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.cookie-modal-content {
    background: #1e1e2a;
    border-radius: 20px;
    max-width: 550px;
    width: 90%;
    margin: 1rem;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    color: #eee;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    background: #2a2a35;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.cookie-category:last-child {
    border-bottom: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-title {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-desc {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #2a2a35;
    border-radius: 0 0 20px 20px;
}

.save-prefs-btn {
    background: #4CAF50;
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.save-prefs-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Mobile Devices - Full width at bottom */
@media (max-width: 768px) {
    .cookie-consent-bar {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        bottom: 0;
        right: 0;
    }
    
    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem;
    }

    .cookie-buttons {
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
    }
}

/* Small adjustments for tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .cookie-consent-bar {
        max-width: 400px;
        right: auto;
        bottom: 20px;
        left: 20px;
    }
}