/* ============================================================
   Nomination Plugin — Front-end Styles
   ============================================================ */

/* ---------- Reset / Variables ---------- */
.np-wrap *,
.np-wrap *::before,
.np-wrap *::after {
    box-sizing: border-box;
}

.np-wrap {
    --np-primary:       #1a73e8;
    --np-primary-dark:  #1558b0;
    --np-success:       #0f9d58;
    --np-error:         #d93025;
    --np-warning:       #f29900;
    --np-bg:            #ffffff;
    --np-surface:       #f8f9fa;
    --np-border:        #dadce0;
    --np-text:          #202124;
    --np-text-muted:    #5f6368;
    --np-radius:        10px;
    --np-shadow:        0 2px 12px rgba(0,0,0,.1);
    --np-transition:    .2s ease;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--np-text);
    max-width: 760px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ---------- Card ---------- */
.np-form-card {
    background: var(--np-bg);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    box-shadow: var(--np-shadow);
    overflow: hidden;
}

/* ---------- Header ---------- */
.np-form-header {
    background: linear-gradient(135deg, var(--np-primary) 0%, var(--np-primary-dark) 100%);
    color: #fff;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
}

.np-icon-award {
    width: 48px;
    height: 48px;
    color: rgba(255,255,255,.85);
}

.np-form-title {
    margin: 0 0 .4rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.5px;
}

.np-form-subtitle {
    margin: 0;
    font-size: .95rem;
    opacity: .85;
}

/* ---------- Alerts ---------- */
.np-alert {
    margin: 0;
    padding: .9rem 1.25rem;
    font-size: .92rem;
    border-left: 4px solid transparent;
}

.np-alert--error {
    background: #fce8e6;
    border-color: var(--np-error);
    color: #c5221f;
}

.np-alert--success {
    background: #e6f4ea;
    border-color: var(--np-success);
    color: #137333;
}

.np-alert ul {
    margin: .4rem 0 0;
    padding-left: 1.25rem;
}

/* ---------- Form body ---------- */
#np-nomination-form {
    padding: 2rem;
}

/* ---------- Sections ---------- */
.np-section-label {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--np-text-muted);
    border-bottom: 2px solid var(--np-border);
    margin-bottom: 5px;
    padding-bottom: .5rem;
}

.np-section-number {
    background: var(--np-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Field groups ---------- */
.np-field-group {
    display: grid;
    gap: 10px;
}

.np-col-2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
    .np-col-2 { grid-template-columns: 1fr; }
    #np-nomination-form { padding: 1.25rem; }
}

/* ---------- Individual fields ---------- */
.np-field {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;
}

.np-label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--np-text);
    margin-bottom: 10px;
}

.np-required {
    color: var(--np-error);
    margin-left: 2px;
}

.np-input {
    padding: .65rem .85rem;
    border: 1.5px solid #eaeaea !important;
    border-radius: 6px;
    font-size: .95rem;
    color: var(--np-text);
    background: var(--np-surface);
    transition: border-color var(--np-transition), box-shadow var(--np-transition);
    outline: none;
    width: 100%;
}

.np-input:focus {
    border-color: var(--np-primary) !important;
    box-shadow: 0 0 0 3px rgba(26,115,232,.15);
    background: #fff;
}

.np-input.np-is-invalid {
    border-color: var(--np-error) !important;
    box-shadow: 0 0 0 3px rgba(217,48,37,.12);
}

.np-field-error {
    font-size: .8rem;
    color: var(--np-error);
    margin-top: 0;
    min-height: 0;
    height: 0;
    overflow: hidden;
    display: block;
    transition: height .15s ease, margin-top .15s ease;
}

/* ---------- Textarea ---------- */
.np-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    font-family: inherit;
}

.np-char-count {
    font-size: .75rem;
    color: var(--np-text-muted);
    text-align: right;
    margin-top: .25rem;
    display: block;
    transition: color .2s;
}

.np-char-near-limit {
    color: var(--np-error);
    font-weight: 600;
}

/* ---------- reCAPTCHA ---------- */
.np-captcha-note {
    font-size: .82rem;
    color: var(--np-text-muted);
    margin: 0;
}

/* ---------- Submit button ---------- */
.np-submit-wrap {
    margin-top: .5rem;
}

.np-btn-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 2.5rem;
    background: var(--np-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background var(--np-transition), transform var(--np-transition), box-shadow var(--np-transition);
    letter-spacing: .3px;
}

.np-btn-submit:hover:not(:disabled) {
    background: var(--np-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26,115,232,.35);
}

.np-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.np-btn-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* Spinner */
.np-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: np-spin .7s linear infinite;
}

.np-btn-submit.np-loading .np-btn-spinner { display: block; }
.np-btn-submit.np-loading .np-btn-text    { opacity: .7; }

@keyframes np-spin {
    to { transform: rotate(360deg); }
}
