/**
 * National Donation Pickup – Quote Form CSS
 * Modern, accessible, mobile-first design
 *
 * @package NationalDonationPickup
 */

/* ================================================================
   CSS VARIABLES
   ================================================================ */
.ndp-app {
    --ndp-primary:     #1a6b4a;
    --ndp-primary-dk:  #145438;
    --ndp-primary-lt:  #e8f5ef;
    --ndp-accent:      #f59e0b;
    --ndp-accent-lt:   #fef3c7;
    --ndp-text:        #1a1a2e;
    --ndp-text-muted:  #6b7280;
    --ndp-border:      #e5e7eb;
    --ndp-bg:          #f9fafb;
    --ndp-white:       #ffffff;
    --ndp-error:       #ef4444;
    --ndp-success:     #10b981;
    --ndp-radius:      12px;
    --ndp-radius-sm:   8px;
    --ndp-shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --ndp-shadow-hover:0 4px 12px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
    --ndp-transition:  .2s ease;
    --ndp-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--ndp-font);
    color: var(--ndp-text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    box-sizing: border-box;
}

*, *::before, *::after { box-sizing: inherit; }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.ndp-progress {
    margin-bottom: 32px;
}
.ndp-progress__label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ndp-text-muted);
    margin-bottom: 8px;
}
.ndp-progress__track {
    background: var(--ndp-border);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}
.ndp-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ndp-primary), var(--ndp-accent));
    border-radius: 99px;
    transition: width .4s cubic-bezier(.4,0,.2,1);
}
.ndp-progress__dots {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ndp-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--ndp-border);
    transition: background var(--ndp-transition), transform var(--ndp-transition);
    cursor: default;
}
.ndp-dot.active {
    background: var(--ndp-primary);
    transform: scale(1.2);
}

/* ================================================================
   LAYOUT
   ================================================================ */
.ndp-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 768px) {
    .ndp-layout { grid-template-columns: 1fr; }
    .ndp-sidebar { order: -1; }
}

/* ================================================================
   STEP CONTAINER
   ================================================================ */
.ndp-step {
    display: none;
    animation: ndpFadeIn .3s ease;
}
.ndp-step.active { display: block; }

@keyframes ndpFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ndp-step__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
}
.ndp-step__subtitle {
    color: var(--ndp-text-muted);
    margin: 0 0 24px;
    font-size: .95rem;
}

/* ================================================================
   STEP 1 – SERVICE CARDS
   ================================================================ */
.ndp-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 480px) { .ndp-services-grid { grid-template-columns: 1fr; } }

.ndp-service-card {
    background: var(--ndp-white);
    border: 2px solid var(--ndp-border);
    border-radius: var(--ndp-radius);
    padding: 24px 20px;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--ndp-transition), box-shadow var(--ndp-transition), transform var(--ndp-transition);
    font-family: inherit;
}
.ndp-service-card:hover {
    border-color: var(--ndp-primary);
    box-shadow: var(--ndp-shadow-hover);
    transform: translateY(-2px);
}
.ndp-service-card.selected {
    border-color: var(--ndp-primary);
    background: var(--ndp-primary-lt);
    box-shadow: 0 0 0 3px rgba(26,107,74,.15);
}
.ndp-service-card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}
.ndp-service-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}
.ndp-service-card p {
    margin: 0;
    font-size: .85rem;
    color: var(--ndp-text-muted);
    line-height: 1.4;
}

/* ================================================================
   FORM FIELDS
   ================================================================ */
.ndp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 480px) { .ndp-form-grid { grid-template-columns: 1fr; } }

.ndp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ndp-field--full { grid-column: 1 / -1; }

.ndp-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ndp-text);
}
.ndp-field label span { color: var(--ndp-error); }

.ndp-field input,
.ndp-field select,
.ndp-field textarea {
    border: 1.5px solid var(--ndp-border);
    border-radius: var(--ndp-radius-sm);
    padding: 10px 14px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--ndp-text);
    background: var(--ndp-white);
    transition: border-color var(--ndp-transition), box-shadow var(--ndp-transition);
    outline: none;
    width: 100%;
}
.ndp-field input:focus,
.ndp-field select:focus,
.ndp-field textarea:focus {
    border-color: var(--ndp-primary);
    box-shadow: 0 0 0 3px rgba(26,107,74,.12);
}
.ndp-field--error input,
.ndp-field--error select,
.ndp-field--error textarea {
    border-color: var(--ndp-error);
}
.ndp-field-error {
    font-size: .8rem;
    color: var(--ndp-error);
}

/* ================================================================
   STEP 3 – ITEMS
   ================================================================ */
.ndp-items-layout { display: flex; gap: 12px; flex-direction: column; }

.ndp-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ndp-cat-btn {
    padding: 7px 16px;
    border: 1.5px solid var(--ndp-border);
    border-radius: 99px;
    background: var(--ndp-white);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    color: var(--ndp-text);
    transition: all var(--ndp-transition);
}
.ndp-cat-btn:hover { border-color: var(--ndp-primary); color: var(--ndp-primary); }
.ndp-cat-btn.active {
    background: var(--ndp-primary);
    border-color: var(--ndp-primary);
    color: var(--ndp-white);
}

.ndp-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.ndp-item-card {
    background: var(--ndp-white);
    border: 1.5px solid var(--ndp-border);
    border-radius: var(--ndp-radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color var(--ndp-transition);
}
.ndp-item-card:hover { border-color: var(--ndp-primary); }
.ndp-item-card__info { display: flex; flex-direction: column; gap: 2px; }
.ndp-item-card__name { font-size: .9rem; font-weight: 500; }
.ndp-item-card__price { font-size: .8rem; color: var(--ndp-text-muted); }

.ndp-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ndp-qty-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--ndp-border);
    background: var(--ndp-white);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
    color: var(--ndp-primary);
    transition: all var(--ndp-transition);
}
.ndp-qty-btn:hover {
    background: var(--ndp-primary);
    border-color: var(--ndp-primary);
    color: white;
}
.ndp-qty-val {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: .95rem;
}

/* ================================================================
   STEP 4 – EXTRAS
   ================================================================ */
.ndp-extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ndp-extra-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1.5px solid var(--ndp-border);
    border-radius: var(--ndp-radius-sm);
    cursor: pointer;
    transition: all var(--ndp-transition);
    background: var(--ndp-white);
    gap: 8px;
}
.ndp-extra-card:hover { border-color: var(--ndp-primary); }
.ndp-extra-card.selected {
    border-color: var(--ndp-primary);
    background: var(--ndp-primary-lt);
}
.ndp-extra-card__label { font-size: .9rem; font-weight: 500; }
.ndp-extra-card__price {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ndp-primary);
    white-space: nowrap;
}

/* ================================================================
   SIDEBAR – LIVE ESTIMATE
   ================================================================ */
.ndp-sidebar {
    position: sticky;
    top: 24px;
}
.ndp-sidebar__inner {
    background: var(--ndp-white);
    border: 1.5px solid var(--ndp-border);
    border-radius: var(--ndp-radius);
    padding: 20px;
    box-shadow: var(--ndp-shadow);
}
.ndp-sidebar__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--ndp-border);
}
.ndp-estimate-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ndp-estimate-row {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    color: var(--ndp-text-muted);
}
.ndp-estimate-divider {
    height: 1.5px;
    background: var(--ndp-border);
    margin: 12px 0;
}
.ndp-estimate-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 700;
}
.ndp-estimate-note {
    font-size: .75rem;
    color: var(--ndp-text-muted);
    margin: 8px 0 0;
}

/* ================================================================
   STEP 6 – PAYMENT
   ================================================================ */
.ndp-payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.ndp-payment-opt {
    padding: 16px;
    border: 2px solid var(--ndp-border);
    border-radius: var(--ndp-radius-sm);
    background: var(--ndp-white);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all var(--ndp-transition);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ndp-payment-opt strong { font-size: .95rem; color: var(--ndp-text); }
.ndp-payment-opt span  { font-size: .8rem; color: var(--ndp-text-muted); }
.ndp-payment-opt:hover { border-color: var(--ndp-primary); }
.ndp-payment-opt.active {
    border-color: var(--ndp-primary);
    background: var(--ndp-primary-lt);
}

.ndp-order-summary {
    background: var(--ndp-bg);
    border-radius: var(--ndp-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}
.ndp-order-summary h3 { margin: 0 0 12px; font-size: .95rem; }
.ndp-sum-row {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    padding: 4px 0;
    color: var(--ndp-text-muted);
}
.ndp-sum-row--total {
    border-top: 1.5px solid var(--ndp-border);
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 700;
    color: var(--ndp-text);
    font-size: .95rem;
}
.ndp-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--ndp-border);
}

#ndp-payment-element {
    padding: 16px;
    border: 1.5px solid var(--ndp-border);
    border-radius: var(--ndp-radius-sm);
    background: var(--ndp-white);
    margin-bottom: 16px;
}

.ndp-secure-note {
    font-size: .78rem;
    color: var(--ndp-text-muted);
    text-align: center;
    margin-top: 12px;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.ndp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--ndp-radius-sm);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--ndp-transition);
    text-decoration: none;
}
.ndp-btn--primary {
    background: var(--ndp-primary);
    color: var(--ndp-white);
}
.ndp-btn--primary:hover:not(:disabled) {
    background: var(--ndp-primary-dk);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,107,74,.3);
}
.ndp-btn--ghost {
    background: transparent;
    border-color: var(--ndp-border);
    color: var(--ndp-text-muted);
}
.ndp-btn--ghost:hover { border-color: var(--ndp-text-muted); color: var(--ndp-text); }
.ndp-btn--pay {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
    border-radius: var(--ndp-radius);
}
.ndp-btn:disabled { opacity: .6; cursor: not-allowed; }

.ndp-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ndpSpin .7s linear infinite;
}
@keyframes ndpSpin { to { transform: rotate(360deg); } }

/* ================================================================
   NAVIGATION
   ================================================================ */
.ndp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 12px;
}

/* ================================================================
   ERRORS
   ================================================================ */
.ndp-error {
    color: var(--ndp-error);
    font-size: .88rem;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: var(--ndp-radius-sm);
    border: 1px solid #fecaca;
    margin-bottom: 12px;
}
.ndp-step-error {
    color: var(--ndp-error);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--ndp-radius-sm);
    padding: 10px 14px;
    font-size: .88rem;
    margin-bottom: 16px;
}
.ndp-notice { color: var(--ndp-text-muted); padding: 24px; text-align: center; }

/* ================================================================
   THANK YOU
   ================================================================ */
.ndp-thankyou {
    text-align: center;
    padding: 48px 24px;
    animation: ndpFadeIn .4s ease;
}
.ndp-thankyou__icon { font-size: 3rem; margin-bottom: 16px; }
.ndp-thankyou h2  { font-size: 1.8rem; margin: 0 0 8px; }
.ndp-thankyou p   { color: var(--ndp-text-muted); margin: 0 0 12px; }
.ndp-thankyou__ref {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ndp-primary);
    letter-spacing: 2px;
    padding: 12px 24px;
    background: var(--ndp-primary-lt);
    border-radius: var(--ndp-radius-sm);
    display: inline-block;
    margin-bottom: 24px;
}
.ndp-thankyou__details {
    max-width: 400px;
    margin: 0 auto 28px;
    text-align: left;
    background: var(--ndp-bg);
    border-radius: var(--ndp-radius-sm);
    padding: 16px 20px;
    font-size: .9rem;
    line-height: 1.8;
}
.ndp-thankyou__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .ndp-nav, .ndp-progress, .ndp-thankyou__actions { display: none; }
    .ndp-thankyou { padding: 0; }
}
