@import url('https://fonts.googleapis.com/css2?family=Oleo+Script+Swash+Caps:wght@400;700&family=Onest:wght@100..900&display=swap');

body{
    margin: 0;
    padding: 0;
    background-color: #004aad;
    height: 100%;
    font-family: "Onest", sans-serif;
}

.context {
    position: relative; /* Needed for absolute positioning of overlay */
    min-height: 100vh;
    background-image: url('../images/schoolBG.png');
    background-repeat: no-repeat;
    background-size: cover;
}

.context::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #004aad;
    opacity: 50%;
    z-index: 0;
}

.Logos{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10%;
    z-index: 1;
}

.SRCB-logo img{
    width: 80px;
    margin-right: 10px;
}

.clinic-logo img {
    width: 80px;
}

.SRCB-clinic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    margin-top: 10px;
    font-weight: bold;
    z-index: 1;
}

/* Main login container */
.login {
    position: relative;
    max-width: 400px;
    width: 90%;
    margin: 15px auto 2rem; /* Top margin 15px, bottom 2rem */
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #333;
}

.form-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.login-button {
    background: #4a90e2;
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.login-button:hover {
    background: #3b82f6;
}

.error-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.popup-content p {
    margin: 0;
    color: #d32f2f;
    font-size: 16px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #555;
}

.close-btn:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.error-popup {
    background: #f44336;
}

.success-popup {
    background: #4CAF50;
}

.popup-content {
    position: relative;
    padding-right: 25px;
}

.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(0,0,0,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(0,0,0,0.3);
}

.success-popup, .error-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: slideIn 0.5s;
}

.success-popup {
    background-color: #4CAF50;
    color: white;
}

.error-popup {
    background-color: #f44336;
    color: white;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes slideIn {
    from {right: -300px; opacity: 0;}
    to {right: 20px; opacity: 1;}
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-button:disabled {
    opacity: 0.8;
    cursor: wait;
}