/* Import Font */
@import url('https://fonts.googleapis.com/css?family=Poppins');

/* General Reset */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-image: url('../img/background.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* Logo */
.logo {
    width: 200px;
    margin-bottom: 20px;
}

/* Title Box */
.title-box {
    background: #004aad;
    padding: 15px 20px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    margin-bottom: -1px;
}

.title-box h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: normal;
    margin: 0;
}

/* Message Box (Success/Error Message) */
.message-box {
    display: none; /* Hide by default */
    background: #ffffff;
    padding: 20px 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 0;
}

/* Show message box when it contains success or error messages */
.message-box:has(.successmsg),
.message-box:has(.errormsg) {
    display: block;
}

.successmsg {
    font-size: 14px;
    color: #2e7d32;
    margin: 0;
    background-color: #e8f5e8;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 4px solid #2e7d32;
}

.errormsg {
    font-size: 14px;
    color: #d32f2f;
    margin: 0;
    background-color: #ffebee;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 4px solid #d32f2f;
}

/* Main Box (Login/Registration) */
.main-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
}

/* Form Elements */
.firstinput {
    margin-top: 0;
}

form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    box-sizing: border-box;
    font-weight: normal;
    text-indent: 8px;
}

form button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: #fff;
    background-color: #004aad;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    margin-top: 10px;
    white-space: nowrap;
}

form button:hover {
    background-color: #0066cc;
}

/* Remember Me Cookies */
.cookies {
    display: block;
    margin-top: 0px;
    justify-content: center;
}

/* Checkbox Styles */
input[type="checkbox"] {
    appearance: checkbox;
    display: inline-block;
    width: auto;
    margin-top: -50px;
    margin-left: 5px;
    padding: 0;
}

/* Text Styles */
p {
    font-size: 0.9rem;
    color: #555;
}

.remembermetext {
    font-size: 0.9rem;
    margin-right: 15px;
}

.existing, .noaccount {
    font-size: 14px;
    color: #666666;
    margin-bottom: 0px;
}

/* Links */
.forgot-password {
    text-decoration: underline;
    color: #007BFF;
    font-size: 0.9rem;
    margin-left: 5px;
    white-space: nowrap;
}

.sign_in, .createaccount {
    color: #004aad;
    text-decoration: none;
    font-weight: normal;
}

.createaccount:hover,
.registration-box a:hover,
.sign_in:hover {
    text-decoration: underline;
}

/* Divider */
hr {
    width: 90%;
    margin-top: 24px;
}

/* Toggle Password Preview */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 40%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.toggle-password:hover {
    color: #004aad;
}
