/* ==========================================================================
   NaPAZ Members – Frontend Stylesheet
   ========================================================================== */

/* ---------- Reset for plugin scope ---------- */
.napaz-container *,
.napaz-container *::before,
.napaz-container *::after {
    box-sizing: border-box;
}

/* ---------- Container ---------- */
.napaz-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px 40px;
    max-width: 820px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.04);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.napaz-container h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1d2939;
    margin: 0 0 28px;
    letter-spacing: -0.3px;
}

/* ---------- Form Grid ---------- */
.napaz-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 20px;
}

/* Width helpers */
.napaz-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.napaz-field.full   { flex: 0 0 100%; }
.napaz-field.half   { flex: 0 0 calc(50% - 10px); }
.napaz-field.third  { flex: 0 0 calc(33.333% - 14px); }

/* Title / First Names / Last Name row — matches screenshot proportions */
.napaz-field.title-width    { flex: 0 0 110px; }
.napaz-field.names-width    { flex: 1 1 0; min-width: 180px; }
.napaz-field.lastname-width { flex: 0 0 calc(38% - 14px); }

/* ---------- Labels ---------- */
.napaz-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}

.napaz-field label .napaz-required {
    color: #dc3545;
    margin-left: 2px;
}

/* ---------- Inputs & Selects ---------- */
.napaz-field input[type="text"],
.napaz-field input[type="email"],
.napaz-field input[type="tel"],
.napaz-field input[type="date"],
.napaz-field input[type="password"],
.napaz-field select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.94rem;
    color: #1d2939;
    background: #f9fafb;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.napaz-field input:focus,
.napaz-field select:focus {
    outline: none;
    border-color: var(--napaz-primary, #0056b3);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.10);
}

.napaz-field input::placeholder {
    color: #98a2b3;
}

/* Disabled inputs */
.napaz-field input:disabled {
    background: #f2f4f7;
    color: #667085;
    cursor: not-allowed;
    border-color: #e4e7ec;
}

/* Select arrow */
.napaz-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667085' d='M2.15 4.65a.5.5 0 0 1 .7 0L6 7.79l3.15-3.14a.5.5 0 1 1 .7.7l-3.5 3.5a.5.5 0 0 1-.7 0l-3.5-3.5a.5.5 0 0 1 0-.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ---------- Section Divider ---------- */
.napaz-form-divider {
    flex: 0 0 100%;
    border: none;
    border-top: 1px solid #e4e7ec;
    margin: 10px 0 4px;
}

.napaz-section-label {
    flex: 0 0 100%;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d2939;
    margin: 0;
    padding-bottom: 0;
}

/* ---------- Submit Row ---------- */
.napaz-submit-row {
    flex: 0 0 100%;
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
}

/* ---------- Submit Button ---------- */
.napaz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--napaz-primary, #f5850c);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 36px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.napaz-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.napaz-button:active {
    transform: translateY(0);
}

/* ---------- Password Hint ---------- */
.napaz-password-hint {
    font-size: 0.78rem;
    color: #667085;
    margin-top: 4px;
}

/* ---------- Error / Success Messages ---------- */
.napaz-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.napaz-alert-error {
    background: #fef3f2;
    border: 1px solid #fda29b;
    color: #b42318;
}

.napaz-alert-success {
    background: #ecfdf3;
    border: 1px solid #6ce9a6;
    color: #027a48;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .napaz-container {
        padding: 24px 18px 28px;
        border-radius: 12px;
    }

    .napaz-container h2 {
        font-size: 1.35rem;
    }

    .napaz-field.half,
    .napaz-field.third {
        flex: 0 0 100%;
    }

    /* Stack the Title / First Names / Last Name row */
    .napaz-field.title-width {
        flex: 0 0 100%;
    }
    .napaz-field.names-width {
        flex: 0 0 100%;
    }
    .napaz-field.lastname-width {
        flex: 0 0 100%;
    }
}
