/* emailotp.css — login / register / verify pages
   Replaces mfa_setup.css. Scoped entirely to .emailotp-* so it can be
   loaded globally without touching the rest of the site. */

/* ---------- Card ---------- */
.emailotp-card {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: sans-serif;
    box-sizing: border-box;
}

/* ---------- Text ---------- */
.emailotp-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: #111827;
}

.emailotp-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 20px;
}

.emailotp-card p {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- Fields ---------- */
.emailotp-field {
    margin-bottom: 4px;
}

.emailotp-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin: 14px 0 4px;
}

.emailotp-card input[type="text"],
.emailotp-card input[type="password"],
.emailotp-card input[type="email"],
.emailotp-card input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    color: #1f2937;
}

.emailotp-card input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* the 6-digit code: wide tracking makes it read as a code, not a number */
.emailotp-card input[name="code"] {
    letter-spacing: 0.4em;
    font-size: 1.05rem;
}

/* ---------- Remember-me checkbox ---------- */
.emailotp-checkbox {
    margin-top: 14px;
}

.emailotp-label-inline {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 400;
    color: #4b5563;
    cursor: pointer;
}

.emailotp-card input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    flex: 0 0 auto;
}

/* ---------- Buttons ---------- */
.emailotp-button {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.emailotp-button:hover {
    background: #1d4ed8;
}

.emailotp-button:disabled {
    background: #93b4f5;
    cursor: default;
}

.emailotp-button-secondary {
    background: #6b7280;
}

.emailotp-button-secondary:hover {
    background: #4b5563;
}

.emailotp-resend {
    margin-top: 16px;
}

/* ---------- Messages ---------- */
.emailotp-error,
.emailotp-message-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.emailotp-message-success {
    background: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.emailotp-message-info,
.emailotp-message-warning {
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

/* Django's own field errors, rendered as <ul class="errorlist"> */
.emailotp-card .errorlist {
    list-style: none;
    padding: 10px 14px;
    margin: 0 0 8px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ---------- Footer link ---------- */
.emailotp-alt {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #6b7280;
}

.emailotp-alt a {
    color: #3b5bdb;
}

/* ---------- Password show/hide (added by emailotp.js) ---------- */
.emailotp-pw-wrap {
    position: relative;
    display: block;
}

.emailotp-pw-wrap input {
    padding-right: 40px;
}

.emailotp-pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 4px;
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
    .emailotp-card {
        margin: 24px 16px;
        padding: 22px;
    }
}