/**
 * Auth Pages Styling
 * Location: /var/www/saafee/public/css/auth.css
 * Shared styles for login, register, forgot-password, reset-password,
 * check-email, and verify-email pages.
 */

/* ============================================
   Shared Auth Layout (login, forgot, reset)
   ============================================ */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    max-width: 450px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-img {
    height: 60px;
    object-fit: contain;
}

.auth-container h1,
.auth-message-box h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.auth-subtitle {
    color: #858585;
    text-align: center;
    font-size: 15px;
    margin-bottom: 12px;
}

.auth-free-badge {
    text-align: center;
    font-size: 13px;
    color: #27ae60;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 20px;
    padding: 6px 16px;
    margin: 0 auto 24px;
    width: fit-content;
}

/* Alerts */
.auth-container .alert,
.auth-message-box .alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

.alert-error {
    background: #fadbd8;
    color: #C53727;
    border-left: 4px solid #E44335;
}

.alert-success {
    background: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

/* Form */
.auth-form {
    margin-bottom: 30px;
}

.auth-container .form-group,
.auth-form-wrapper .form-group {
    margin-bottom: 20px;
}

.auth-container .form-group label,
.auth-form-wrapper .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.auth-container .form-group input,
.auth-form-wrapper .form-group input,
.auth-form-wrapper .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.auth-container .form-group input:focus,
.auth-form-wrapper .form-group input:focus,
.auth-form-wrapper .form-group select:focus {
    outline: none;
    border-color: #E44335;
    box-shadow: 0 0 0 3px rgba(228, 67, 53, 0.1);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #858585;
    margin-top: 6px;
}

.auth-container .error-message {
    color: #E44335;
    font-size: 13px;
    display: block;
    margin-top: 6px;
}

/* Buttons */
.auth-container .btn,
.auth-form-wrapper .btn,
.auth-message-box .btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.auth-container .btn-block,
.auth-form-wrapper .btn-full {
    width: 100%;
}

.auth-container .btn-primary,
.auth-form-wrapper .btn-primary,
.auth-message-box .btn-primary {
    background: #E44335;
    color: white;
}

.auth-container .btn-primary:hover,
.auth-form-wrapper .btn-primary:hover,
.auth-message-box .btn-primary:hover {
    background: #C53727;
}

.auth-container .btn-secondary {
    background: #858585;
    color: white;
}

.auth-container .btn-secondary:hover {
    background: #6c6c6c;
}

/* Divider */
.form-divider {
    text-align: center;
    color: #bbb;
    position: relative;
    z-index: 1;
    background: white;
    padding: 0 12px;
    width: fit-content;
    margin: 24px auto;
}

.form-divider::before {
    content: '';
    position: absolute;
    left: -100px;
    right: -100px;
    top: 50%;
    height: 1px;
    background: #eee;
    z-index: -1;
}

/* Verify info box */
.verify-info {
    background: #fff8f5;
    border-left: 4px solid #E44335;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #2c3e50;
}

/* Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    font-size: 14px;
    color: #2c3e50;
    margin: 12px 0;
}

.auth-footer a {
    color: #E44335;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.link-primary {
    color: #E44335;
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

.help-text {
    font-size: 13px;
    color: #858585;
    margin-top: 16px;
    text-align: center;
}

/* ============================================
   Auth Tabs (Login / Sign up)
   ============================================ */

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    color: #999;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab:hover {
    color: #555;
}

.auth-tab.active {
    color: #E44335;
    border-bottom-color: #E44335;
    font-weight: 600;
}

/* ============================================
   Register Form Variant
   ============================================ */

.auth-form-wrapper {
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
}

.auth-header h1 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.auth-header p {
    color: #858585;
    font-size: 14px;
    margin-bottom: 30px;
}

/* ============================================
   Standalone Auth Pages (check-email, verify-email)
   ============================================ */

.auth-standalone {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.auth-message-box {
    background: white;
    padding: 80px 50px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.auth-message-box .logo {
    margin-bottom: 50px;
}

.auth-message-box .logo img {
    height: 60px;
    object-fit: contain;
}

.auth-message-box .icon {
    font-size: 64px;
    margin-bottom: 30px;
}

.auth-message-box .icon.small {
    font-size: 56px;
    margin-bottom: 24px;
    line-height: 1;
}

.auth-message-box .subtitle {
    color: #858585;
    font-size: 15px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Check Email specific */
.auth-message-box .email-box {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #e8e8e8;
}

.auth-message-box .email-box p {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 6px;
}

.auth-message-box .email-box strong {
    color: #E44335;
    font-size: 15px;
}

.auth-message-box .info {
    background: #d5f4e6;
    border-left: 4px solid #27ae60;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: left;
}

.auth-message-box .info-text {
    color: #27ae60;
    font-size: 14px;
    line-height: 1.6;
}

.auth-message-box .actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.auth-message-box .hint {
    color: #858585;
    font-size: 13px;
    margin-top: 16px;
}

.auth-message-box .secondary-action {
    margin-top: 24px;
}

.auth-message-box .secondary-action a {
    color: #858585;
    text-decoration: none;
    font-size: 14px;
}

.auth-message-box .secondary-action a:hover {
    color: #E44335;
}

/* Verify Email specific */
.auth-message-box .content {
    margin-bottom: 50px;
}

.auth-message-box .message {
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.6;
}

.auth-message-box .message.error {
    background-color: #fadbd8;
    color: #C53727;
    border-left: 5px solid #E44335;
    text-align: left;
}

.auth-message-box .message.success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left: 5px solid #27ae60;
    text-align: left;
}

.auth-message-box .link {
    margin-top: 40px;
}

.auth-message-box .link a {
    color: white;
    background-color: #E44335;
    text-decoration: none;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.auth-message-box .link a:hover {
    background-color: #C53727;
}

.auth-message-box .secondary-link {
    margin-top: 20px;
}

.auth-message-box .secondary-link a {
    color: #858585;
    text-decoration: none;
    font-size: 14px;
}

.auth-message-box .secondary-link a:hover {
    color: #E44335;
    text-decoration: underline;
}

/* Remember me — custom checkbox */
.auth-container .form-group.remember-me-group {
    margin-bottom: 20px;
}

.auth-container .form-group.remember-me-group label.remember-me-label {
    display: inline-grid;
    grid-template-columns: 16px auto;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #555;
    line-height: 1;
    margin-bottom: 0;
    user-select: none;
}

.auth-container .form-group.remember-me-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    background-color: #fff;
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-container .form-group.remember-me-group input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 9px;
    transform: scale(0);
    transform-origin: bottom left;
    transition: 120ms transform ease-in-out;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    background: #fff;
}

.auth-container .form-group.remember-me-group input[type="checkbox"]:checked {
    background-color: #E44335;
    border-color: #E44335;
}

.auth-container .form-group.remember-me-group input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.auth-container .form-group.remember-me-group input[type="checkbox"]:focus-visible {
    outline: 2px solid #E44335;
    outline-offset: 2px;
}

/* Verification email note */
.auth-verify-note {
    text-align: center;
    font-size: 13px;
    color: #858585;
    margin-top: 12px;
}
