/* ==============================================
   Login Page Styles
   SROI Platform - มหาวิทยาลัยขอนแก่น
   ============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#login-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

#login-bg {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.overlay-btn {
    position: absolute;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

/* ปุ่ม "เข้าสู่ระบบด้วย KKU Mail" - SSO */
#btn-login-kku {
    left: 59.8%;
    top: 16.5%;
    width: 22.2%;
    height: 7%;
    border-radius: 8px;
}

/* ปุ่ม "Login" - Guest */
#btn-guest {
    left: 59.8%;
    top: 28.5%;
    width: 22.2%;
    height: 7%;
    border-radius: 8px;
}

/* ปุ่ม "คู่มือการใช้งาน" */
#btn-manual {
    left: 59.8%;
    top: 38.5%;
    width: 22.2%;
    height: 7%;
    border-radius: 8px;
}

/* ปุ่ม "คู่มือฉบับปฏิบัติการ SROI KKU" */
#SROI-KKU-Operational-Manual {
    left: 59.8%;
    top: 48.5%;
    width: 22.2%;
    height: 7%;
    border-radius: 8px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #e53e3e;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #38a169;
}

.toast.info {
    background: #3182ce;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 15px;
    font-size: 16px;
}
