/* =========================================================
   HGC Member Login – Frontend Styles
   ========================================================= */

.hgc-ml-wrap {
    max-width: 420px;
    margin: 2rem auto;
    font-family: inherit;
}

.hgc-ml-heading {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.hgc-ml-intro {
    color: #555;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ---- Fields ---- */
.hgc-ml-field {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hgc-ml-field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.hgc-ml-field input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.hgc-ml-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Larger, centred OTP input */
#hgc_otp_code {
    letter-spacing: 0.35em;
    font-size: 1.6rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---- Button ---- */
.hgc-ml-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.hgc-ml-btn:hover {
    background: #005a87;
}

.hgc-ml-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* ---- Messages ---- */
.hgc-ml-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.hgc-ml-message.is-error {
    background: #fde8e8;
    border-left: 4px solid #c0392b;
    color: #922b21;
}

.hgc-ml-message.is-success {
    background: #e8f8e8;
    border-left: 4px solid #27ae60;
    color: #1e7e34;
}

/* ---- Resend link ---- */
.hgc-ml-resend {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.hgc-ml-resend a {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

/* ---- Already logged in ---- */
.hgc-ml-already-in {
    background: #f0f7ff;
    border: 1px solid #b8d9f3;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    max-width: 420px;
    margin: 1rem auto;
}

.hgc-ml-logout-link {
    color: #c0392b;
}

/* ---- Loading spinner (CSS only) ---- */
.hgc-ml-btn.is-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hgcSpin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes hgcSpin {
    to { transform: rotate(360deg); }
}
