/* Cookie Consent Banner CSS and JavaScript */

/* CSS Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    display: none;
    font-family: 'Sarabun', Arial, sans-serif;
}

.cookie-consent-banner.show {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h4 {
    margin: 0 0 10px 0;
    color: #ffc107;
    font-size: 18px;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-consent-text a {
    color: #4da6ff;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Sarabun', Arial, sans-serif;
}

.cookie-btn-accept {
    background-color: #28a745;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #218838;
}

.cookie-btn-decline {
    background-color: #dc3545;
    color: white;
}

.cookie-btn-decline:hover {
    background-color: #c82333;
}

.cookie-btn-settings {
    background-color: #6c757d;
    color: white;
}

.cookie-btn-settings:hover {
    background-color: #5a6268;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.cookie-settings-modal.show {
    display: block;
}

.cookie-settings-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #043d93;
    padding-bottom: 15px;
}

.cookie-settings-header h3 {
    margin: 0;
    color: #043d93;
}

.cookie-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

.cookie-close:hover {
    color: #000;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #043d93;
}

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

.cookie-category-header h4 {
    margin: 0;
    color: #043d93;
    font-size: 16px;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #28a745;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cookie-settings-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.cookie-settings-footer button {
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }
    
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .cookie-settings-content {
        margin: 10% 10px;
        padding: 20px;
    }
}

/* Cookie Icon */
.cookie-icon {
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
}
