﻿/* login.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: #e6f2ff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-container {
    background: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    min-height: 300px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

    .login-container h2 {
        color: #19428A;
        margin-bottom: 25px;
        text-align: center;
        font-weight: 700;
        letter-spacing: 1px;
    }

    .login-container input[type="email"],
    .login-container input[type="password"] {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 18px;
        border-radius: 8px;
        border: 1px solid #ccc;
        font-size: 1rem;
        outline: none;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

        .login-container input[type="email"]:focus,
        .login-container input[type="password"]:focus {
            border-color: #66b3ff;
            box-shadow: 0 0 5px rgba(102, 179, 255, 0.5);
            font-size : 1rem
        }

    .login-container button {
        width: 100%;
        padding: 12px;
        background-color: #19428A;
        color: #fff;
        font-size: 1rem;
        font-weight: 500;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .login-container button:hover {
            background-color: #005a9e;
            box-shadow: 0 5px 15px rgba(0,114,198,0.4);
        }

.login-footer {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}

.form-group {
    position: relative; /* ทำให้ span อยู่ใกล้ input */
    margin-bottom: 20px; /* เว้นระยะจาก field ต่อไป */
}
.warning-text {
    position: absolute; /* ทำให้ span อยู่ใกล้ input */
    left: 0;
    bottom: -2px; /* อยู่ใต้ input แบบชิดพอดี */
    color: red;
    font-size: 0.85rem;
    line-height: 1; /* ปรับให้สูงน้อยลง */
}

.btn-regis {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
    text-decoration: none; /* สำหรับ a */
    background-color: #FF4F03 !important;
    color: #fff !important;
    display: inline-block; /* ทำให้ a behave like button */
}
    .btn-regis:hover {
        background-color: #005ea6;
        transform: translateY(-2px);
    }

.button-group {
    display: flex;
    gap: 10px;
}

.forgot-password {
    margin-top: 2px;
    text-align: center;
}

    .forgot-password a {
        font-size: 0.85rem;
        color: #19428A;
        text-decoration: none;
    }

        .forgot-password a:hover {
            text-decoration: underline;
        }

/* ======================
   Modal Overlay
====================== */
.w3-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: none; /* Hidden by default */
}

/* ======================
   Modal Content
====================== */
.w3-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px 30px;
    border-radius: 12px;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    animation-name: slideIn;
    animation-duration: 0.4s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ======================
   Modal Header
====================== */
.w3-modal-content header {
    text-align: center;
    margin-bottom: 20px;
}

    .w3-modal-content header h2 {
        color: #0078D7;
        font-size: 18px;
        margin: 0;
    }

.w3-display-topright {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 22px;
    cursor: pointer;
    color: black;
}

/* ======================
   Modal Inputs & Buttons
====================== */
.input-group-forget input,
.form-container input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.input-group-forget button,
.form-container button {
    width: 100%;
    padding: 10px;
    background-color: #0078D7;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

    .input-group-forget button:hover,
    .form-container button:hover {
        background-color: #005a9e;
    }

/* ======================
   Modal Footer
====================== */
.w3-modal-content footer {
    text-align: center;
    margin-top: 20px;
    color: #333;
    font-size: 14px;
}

/* ======================
   Centering content
====================== */
.input-group-forget,
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
