/* Cookie Consent Banner - PDPA Compliance */
/* Based on SSO PDPA Design with StudentInfo customizations */

#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #000000 0%, #212529 100%);
    color: white;
    padding: 1rem 0;
    z-index: 9998; /* Below AdSense ads (9999) */
    display: none; /* Hidden by default, shown by JS when needed */
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#cookieConsentBanner .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px;
}

#cookieConsentBanner .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 -15px;
}

#cookieConsentBanner .consent-text {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

#cookieConsentBanner .consent-buttons {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    text-align: right;
}

#cookieConsentBanner p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

#cookieConsentBanner p:last-child {
    margin-bottom: 0;
}

#cookieConsentBanner strong {
    font-weight: 600;
}

#cookieConsentBanner a {
    color: #ffc107;
    text-decoration: underline;
    transition: color 0.3s ease;
}

#cookieConsentBanner a:hover {
    color: #ffca2c;
    text-decoration: underline;
}

/* Accept Button - Yellow */
.btn-cookie-accept {
    background-color: #ffc107;
    color: #000;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    font-family: 'Kanit', sans-serif;
    display: inline-block;
    text-align: center;
}

.btn-cookie-accept:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-cookie-accept:active {
    transform: translateY(0);
}

/* Decline Button - White outline */
.btn-cookie-decline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
    display: inline-block;
    text-align: center;
}

.btn-cookie-decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-cookie-decline:active {
    transform: translateY(0);
}

/* Responsive Design - Tablet and below */
@media (max-width: 768px) {
    #cookieConsentBanner {
        padding: 1.25rem 0;
    }

    #cookieConsentBanner .consent-text,
    #cookieConsentBanner .consent-buttons {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    #cookieConsentBanner .consent-buttons {
        margin-top: 1rem;
        text-align: center;
    }

    .btn-cookie-accept,
    .btn-cookie-decline {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0.5rem auto;
    }

    .btn-cookie-accept {
        margin-right: auto;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    #cookieConsentBanner {
        padding: 1rem 0;
    }

    #cookieConsentBanner p {
        font-size: 0.875rem;
    }

    .btn-cookie-accept,
    .btn-cookie-decline {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Animation for showing banner */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookieConsentBanner.show {
    display: block;
    animation: slideUp 0.4s ease-out;
}
