/**
 * DME-T Cookie Consent Styles
 * Styling for cookie consent popup and preferences modal
 */

/* Cookie Consent Popup */
.cookie-consent-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-consent-content {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    color: white;
    font-size: 14px;
}

.cookie-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.cookie-logo {
    height: 40px;
    margin-right: 15px;
}

.cookie-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: white;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cookie-customize {
    background-color: #6ABC44 !important;
    border: 2px solid #6ABC44 !important;
    color: #ffffff !important;
}

.cookie-accept {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

.cookie-save {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

.cookie-footer {
    margin-top: 10px;
    font-size: 12px;
}

.cookie-footer a {
    color: white;
    text-decoration: underline;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cookie-preferences-content {
    background-color: white;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cookie-preferences-modal .cookie-header {
    background-color: var(--dme-dark, #333);
    padding: 15px 20px;
    position: relative;
}

.cookie-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cookie-preferences-body {
    padding: 20px;
    color: #333;
}

.cookie-preferences-options {
    margin-top: 20px;
}

.cookie-preference-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cookie-preference-item:last-child {
    border-bottom: none;
}

.cookie-preference-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.cookie-type-label {
    font-weight: bold;
    margin-left: 10px;
}

.cookie-required-label {
    margin-left: 5px;
    font-size: 12px;
    color: #777;
}

.cookie-type-description {
    margin-left: 50px;
    font-size: 13px;
    color: #666;
}

.cookie-preferences-footer {
    padding: 15px 20px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: flex-end;
}

/* Switch Styles */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .cookie-slider {
    background-color: var(--dme-accent, #8bc53f);
}

input:focus + .cookie-slider {
    box-shadow: 0 0 1px var(--dme-accent, #8bc53f);
}

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

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

/* Toast Styles */
.cookie-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.cookie-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 15px;
    }
    
    .cookie-logo {
        height: 30px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .cookie-preferences-content {
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .cookie-preferences-body {
        padding: 15px;
    }
    
    .cookie-type-description {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-preference-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-type-label {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .cookie-switch {
        margin-bottom: 10px;
    }
}