/**
 * register.css
 * Styles for the Registration page (templates/register.html)
 * 
 * This stylesheet provides:
 * - Centered card layout for registration form
 * - Logo and branding styling
 * - Two-column name input layout
 * - Password strength requirements indicator
 * - Security question dropdown styling
 * - Terms checkbox styling
 * - Responsive design for mobile devices
 */

/* ============================================
   BASE RESET & LAYOUT
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #efeae0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Basis Grotesque", Helvetica, Arial, sans-serif;
    padding: 2rem 1rem;
}

/* ============================================
   REGISTER CONTAINER & CARD
   ============================================ */
.register-container {
    max-width: 580px;
    width: 100%;
}

.register-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    border: 1px solid #e9ecef;
}

/* ============================================
   LOGO & BRANDING
   ============================================ */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon { /* Has scaling issues on safari so avoid */
    width: 50%;
    height: 50%;
    object-fit: contain;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.logo-svg { /* replacement for .logo-icon class, works fine on safari and chrome now */
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin: 0.5rem 0 0.25rem 0;
}

.logo-subtitle {
    color: #5f6368;
    font-size: 0.875rem;
    font-weight: 400;
}

/* ============================================
   DIVIDER & SECTION TITLE
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #5f6368;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dadce0;
}

.divider span {
    padding: 0 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-label {
    font-weight: 500;
    color: #202124;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: #8ed5e9;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #80868b;
}

/* ============================================
   PASSWORD FIELD & TOGGLE
   ============================================ */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #202124;
}

/* ============================================
   PASSWORD STRENGTH REQUIREMENTS
   Shows real-time validation feedback
   ============================================ */
.password-requirements {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.password-requirements li {
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-requirements li i {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
}

.password-requirements li.valid {
    color: #137333;
}

.password-requirements li.valid i {
    color: #137333;
}

.password-requirements li.invalid i {
    color: #dadce0;
}

/* ============================================
   NAME INPUT ROW (Two columns)
   ============================================ */
.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================
   REGISTER BUTTON
   ============================================ */
.btn-register {
    width: 100%;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 6px;
    background-color: #8ed5e9;
    border: none;
    color: black;
    transition: all 0.2s;
}

.btn-register:hover {
    background-color: #1a73e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-register:active {
    background-color: #1765cc;
}

.btn-register:disabled {
    background-color: #dadce0;
    cursor: not-allowed;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    border-radius: 6px;
    border: none;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.alert-danger {
    background-color: #fce8e6;
    color: #c5221f;
}

.alert-success {
    background-color: #e6f4ea;
    color: #137333;
}

.alert-info {
    background-color: #e8f0fe;
    color: #8ed5e9;
}

/* ============================================
   TERMS CHECKBOX
   ============================================ */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #5f6368;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
    accent-color: #1a73e8;
}

.terms-checkbox a {
    color: #8ed5e9;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* ============================================
   LOGIN LINK (bottom of form)
   ============================================ */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.875rem;
    color: #5f6368;
}

.login-link a {
    color: #8ed5e9;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1.25rem !important;
}

/* ============================================
   FORM VALIDATION STATES
   ============================================ */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #198754;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 480px) {
    .name-row {
        grid-template-columns: 1fr;
    }

    .password-requirements ul {
        grid-template-columns: 1fr;
    }

    .register-card {
        padding: 1.5rem;
    }
}
