/* ─────────────────────────────────────────────────────────────────────────────
   Eastcliff Auth Widgets — Frontend Styles
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Layout ──────────────────────────────────────────────────────────────────*/
.ec-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.ec-auth-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
    box-sizing: border-box;
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.ec-auth-heading {
    font-size: 28px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.2;
    border: none;
}

.ec-auth-subheading {
    font-size: 14px;
    color: #6b6b6b;
    margin: 0 0 32px;
    padding: 0;
    line-height: 1.5;
}

/* ── Field group ─────────────────────────────────────────────────────────── */
.ec-field-group {
    margin-bottom: 20px;
}

.ec-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.ec-required {
    color: #e74c3c;
    margin-left: 2px;
}

.ec-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ec-field-wrapper .ec-field-input {
    padding-right: 48px !important;
}

.ec-field-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    color: #0a0a0a;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.ec-field-input:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.ec-field-input::placeholder {
    color: #aaa;
}

/* ── Password toggle ─────────────────────────────────────────────────────── */
.ec-toggle-pass {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.ec-toggle-pass:hover { color: #0a0a0a; }
.ec-toggle-pass:focus { outline: 2px solid #0a0a0a; outline-offset: 2px; border-radius: 3px; }

/* ── Row (remember + forgot) ─────────────────────────────────────────────── */
.ec-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.ec-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.ec-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0a0a0a;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.ec-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #0a0a0a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s;
    letter-spacing: 0.02em;
    margin-top: 8px;
    font-family: inherit;
    min-height: 52px;
}

.ec-submit-btn:hover:not(:disabled) { background: #333; }
.ec-submit-btn:active:not(:disabled) { transform: scale(0.99); }

.ec-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ec-submit-btn:focus-visible {
    outline: 3px solid #0a0a0a;
    outline-offset: 3px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
@keyframes ec-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ec-spin {
    animation: ec-spin 0.75s linear infinite;
    display: block;
}

/* ── Footer / links ──────────────────────────────────────────────────────── */
.ec-auth-footer {
    text-align: center;
    margin: 20px 0 0;
    font-size: 13px;
    color: #888;
}

.ec-auth-link {
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ec-auth-link:hover { color: #e74c3c; text-decoration: underline; }
.ec-auth-link:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; border-radius: 2px; }

.ec-forgot-link {
    font-size: 13px;
    color: #0a0a0a;
    text-decoration: none;
}
.ec-forgot-link:hover { text-decoration: underline; }

/* ── Password hint ───────────────────────────────────────────────────────── */
.ec-password-hint {
    font-size: 12px;
    color: #888;
    margin: -12px 0 20px;
    line-height: 1.4;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */
.ec-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.4;
    display: none;
}

.ec-notice.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ec-notice.is-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── Honeypot — visually hidden, accessible to screen readers too ─────────── */
.ec-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    height: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ec-auth-card {
        padding: 32px 24px;
        border-radius: 12px;
    }

    .ec-auth-heading {
        font-size: 24px;
    }
}
