/* Cookie Consent Banner Styles */

.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    max-width: 380px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 1rem;
    z-index: 10000;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    font-family: 'Prompt', 'Kanit', sans-serif;
}

/* ปรับเฉพาะ PC (Desktop) */
@media (min-width: 768px) {
    .cookie-consent-banner {
        max-width: 300px;
        padding: 1rem;
        bottom: 80px; /* ยกขึ้นเพื่อไม่ให้ทับกับปุ่ม */
    }
}

@media (max-width: 767px) {
    .cookie-consent-banner {
        max-width: calc(100% - 40px);
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}

.cookie-consent-banner.cookie-consent-hide {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.cookie-consent-text {
    text-align: left;
}

.cookie-consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

@media (min-width: 768px) {
    .cookie-consent-text h3 {
        font-size: 0.875rem;
        margin: 0 0 0.375rem 0;
    }
}

.cookie-consent-text p {
    margin: 0 0 0.5rem 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .cookie-consent-text p {
        font-size: 0.75rem;
        margin: 0 0 0.375rem 0;
        line-height: 1.4;
    }
}

.cookie-consent-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.cookie-consent-link {
    color: #60a5fa;
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .cookie-consent-link {
        font-size: 0.75rem;
    }
}

.cookie-consent-link:hover {
    color: #93c5fd;
}

.cookie-consent-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.cookie-consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .cookie-consent-buttons {
        gap: 0.5rem;
    }
}

.cookie-consent-btn {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-consent-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

.cookie-consent-accept {
    background: linear-gradient(135deg, #AB000D 0%, #ea580c 100%);
    color: white;
}

.cookie-consent-accept:hover {
    background: linear-gradient(135deg, #c2410c 0%, #f97316 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(171, 0, 13, 0.4);
}

.cookie-consent-decline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent-settings {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-settings:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}


/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner {
    animation: slideUp 0.3s ease-out;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.cookie-settings-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s ease-out;
}

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

.cookie-settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cookie-settings-close:hover {
    color: #1f2937;
}

.cookie-settings-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-category-header {
    margin-bottom: 0.5rem;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.cookie-category-toggle input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #AB000D;
}

.cookie-category-toggle input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.cookie-required {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: normal;
}

.cookie-category-description {
    margin: 0.5rem 0 0 2rem;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpModal {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

