/**
 * SND Quote — Frontend Form Styles (v1.5.2)
 * Modern e-commerce style design
 */

/* ============================================================
   Design tokens
   ============================================================ */
.snd-quote-form-wrap {
    --snd-primary: #bf1e2e;
    --snd-primary-dark: #951622;
    --snd-primary-light: #fde8ea;
    --snd-accent: #1e5a8e;
    --snd-accent-light: #e8f1fa;
    --snd-success: #1e7e34;
    --snd-warning: #b3690a;
    --snd-text: #1d2327;
    --snd-text-muted: #5f6368;
    --snd-text-light: #80868b;
    --snd-border: #e0e0e0;
    --snd-border-light: #eeeeee;
    --snd-bg: #ffffff;
    --snd-bg-subtle: #fafafa;
    --snd-bg-section: #f8f9fb;
    --snd-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --snd-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --snd-shadow-md: 0 4px 8px rgba(0,0,0,0.06);
    --snd-shadow-lg: 0 8px 24px rgba(191,30,46,0.16);
    --snd-radius: 8px;
    --snd-radius-lg: 12px;
    --snd-transition: all 0.2s ease;

    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    color: var(--snd-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    box-sizing: border-box;
}
.snd-quote-form-wrap *,
.snd-quote-form-wrap *::before,
.snd-quote-form-wrap *::after {
    box-sizing: border-box;
}

/* ============================================================
   Form heading
   ============================================================ */
.snd-quote-form-heading {
    font-size: 30px;
    font-weight: 600;
    color: var(--snd-text);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.snd-quote-form-subheading {
    color: var(--snd-text-muted);
    font-size: 15px;
    margin: 0 0 32px;
}

/* ============================================================
   Section
   ============================================================ */
.snd-quote-section {
    background: var(--snd-bg);
    border: 1px solid var(--snd-border-light);
    border-radius: var(--snd-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--snd-shadow-sm);
    transition: var(--snd-transition);
}
.snd-quote-section:hover {
    box-shadow: var(--snd-shadow);
}

.snd-quote-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--snd-text);
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}
.snd-quote-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--snd-primary), var(--snd-primary-dark));
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(191, 30, 46, 0.25);
}
.snd-quote-section-intro {
    color: var(--snd-text-muted);
    font-size: 14px;
    margin: 0 0 20px;
    padding-left: 44px;
}

/* ============================================================
   Product list / rows
   ============================================================ */
.snd-quote-products-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.snd-quote-product-row {
    display: grid;
    grid-template-columns: 90px 1fr 130px 110px 110px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--snd-bg);
    border: 1px solid var(--snd-border-light);
    border-radius: var(--snd-radius);
    transition: var(--snd-transition);
}
.snd-quote-product-row:hover {
    border-color: var(--snd-border);
    background: var(--snd-bg-subtle);
}
.snd-quote-product-row.snd-quote-has-qty {
    border-color: var(--snd-primary-light);
    background: linear-gradient(90deg, rgba(253, 232, 234, 0.3) 0%, rgba(253, 232, 234, 0) 100%);
}

.snd-quote-product-image {
    width: 90px;
    height: 90px;
    border-radius: var(--snd-radius);
    overflow: hidden;
    background: var(--snd-bg-section);
    border: 1px solid var(--snd-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}
.snd-quote-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.snd-quote-product-info {
    min-width: 0;
}
.snd-quote-product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--snd-text);
    margin: 0 0 2px;
    line-height: 1.4;
}
.snd-quote-product-description {
    font-size: 12px;
    color: var(--snd-text-muted);
    line-height: 1.5;
    margin: 0;
}
.snd-quote-product-description p { margin: 0; }

.snd-quote-product-price {
    text-align: right;
    font-size: 13px;
}
.snd-quote-price-amount {
    display: block;
    font-weight: 600;
    color: var(--snd-text);
    font-size: 15px;
}
.snd-quote-price-unit {
    display: block;
    color: var(--snd-text-light);
    font-size: 11px;
    margin-top: 2px;
}

.snd-quote-product-qty {
    text-align: center;
}
.snd-quote-qty-input {
    width: 80px;
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--snd-border);
    border-radius: var(--snd-radius);
    background: var(--snd-bg);
    color: var(--snd-text);
    transition: var(--snd-transition);
    -moz-appearance: textfield;
}
.snd-quote-qty-input::-webkit-outer-spin-button,
.snd-quote-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.snd-quote-qty-input:hover {
    border-color: var(--snd-text-light);
}
.snd-quote-qty-input:focus {
    border-color: var(--snd-primary);
    box-shadow: 0 0 0 3px rgba(191, 30, 46, 0.12);
    outline: none;
}

.snd-quote-product-total {
    text-align: right;
    font-size: 15px;
}
.snd-quote-subtotal-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--snd-text-light);
    margin-bottom: 2px;
    font-weight: 600;
}
.snd-quote-line-total {
    display: block;
    font-weight: 600;
    color: var(--snd-text);
}
.snd-quote-product-row.snd-quote-has-qty .snd-quote-line-total {
    color: var(--snd-primary);
}

/* ============================================================
   Section subtotal
   ============================================================ */
.snd-quote-section-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--snd-bg-section);
    border-radius: var(--snd-radius);
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--snd-text);
}
.snd-quote-section-subtotal .snd-quote-section-total {
    font-size: 18px;
    color: var(--snd-text);
}

/* ============================================================
   Customer info section
   ============================================================ */
.snd-quote-section-customer .snd-quote-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    padding-left: 0;
}
.snd-quote-field {
    display: flex;
    flex-direction: column;
}
.snd-quote-field-full {
    grid-column: 1 / -1;
}
.snd-quote-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--snd-text);
    margin-bottom: 6px;
}
.snd-quote-required {
    color: var(--snd-primary);
    margin-left: 2px;
}

.snd-quote-form-wrap input[type="text"],
.snd-quote-form-wrap input[type="email"],
.snd-quote-form-wrap input[type="tel"],
.snd-quote-form-wrap input[type="number"],
.snd-quote-form-wrap select,
.snd-quote-form-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--snd-text);
    background: var(--snd-bg);
    border: 1px solid var(--snd-border);
    border-radius: var(--snd-radius);
    transition: var(--snd-transition);
    font-family: inherit;
    line-height: 1.5;
}
.snd-quote-form-wrap input[type="text"]:hover,
.snd-quote-form-wrap input[type="email"]:hover,
.snd-quote-form-wrap input[type="tel"]:hover,
.snd-quote-form-wrap input[type="number"]:hover,
.snd-quote-form-wrap select:hover,
.snd-quote-form-wrap textarea:hover {
    border-color: var(--snd-text-light);
}
.snd-quote-form-wrap input[type="text"]:focus,
.snd-quote-form-wrap input[type="email"]:focus,
.snd-quote-form-wrap input[type="tel"]:focus,
.snd-quote-form-wrap input[type="number"]:focus,
.snd-quote-form-wrap select:focus,
.snd-quote-form-wrap textarea:focus {
    border-color: var(--snd-primary);
    box-shadow: 0 0 0 3px rgba(191, 30, 46, 0.12);
    outline: none;
}
.snd-quote-form-wrap textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio group for address type */
.snd-quote-radio-group {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.snd-quote-radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}
.snd-quote-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.snd-quote-radio-option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--snd-bg);
    border: 1px solid var(--snd-border);
    border-radius: var(--snd-radius);
    font-weight: 500;
    color: var(--snd-text);
    transition: var(--snd-transition);
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}
.snd-quote-radio-option:hover .snd-quote-radio-option-label {
    border-color: var(--snd-text-light);
    background: var(--snd-bg-subtle);
}
.snd-quote-radio-option input[type="radio"]:checked + .snd-quote-radio-option-label {
    border-color: var(--snd-primary);
    background: var(--snd-primary-light);
    color: var(--snd-primary);
    font-weight: 600;
}
.snd-quote-radio-option input[type="radio"]:focus + .snd-quote-radio-option-label {
    box-shadow: 0 0 0 3px rgba(191, 30, 46, 0.12);
}

/* ============================================================
   Summary / Grand total card (sticky bottom)
   ============================================================ */
.snd-quote-summary {
    background: linear-gradient(135deg, var(--snd-primary) 0%, var(--snd-primary-dark) 100%);
    color: #fff;
    border-radius: var(--snd-radius-lg);
    padding: 24px 28px;
    margin: 24px 0;
    box-shadow: var(--snd-shadow-lg);
    position: sticky;
    bottom: 20px;
    z-index: 10;
}
.snd-quote-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.snd-quote-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.92;
}
.snd-quote-summary-row-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 4px 0;
}
.snd-quote-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.snd-quote-grand-total-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    opacity: 0.95;
}
.snd-quote-grand-total-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ============================================================
   Submit button + footer
   ============================================================ */
.snd-quote-submit-wrap {
    text-align: center;
    margin: 24px 0;
}
.snd-quote-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 48px;
    background: var(--snd-primary);
    color: #fff;
    border: none;
    border-radius: var(--snd-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(191, 30, 46, 0.25);
    transition: var(--snd-transition);
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
    min-width: 240px;
}
.snd-quote-submit-button:hover {
    background: var(--snd-primary-dark);
    box-shadow: 0 4px 16px rgba(191, 30, 46, 0.35);
    transform: translateY(-1px);
    color: #fff;
}
.snd-quote-submit-button:active {
    transform: translateY(0);
}
.snd-quote-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.snd-quote-submit-button .snd-quote-submit-icon {
    font-size: 18px;
}
.snd-quote-submit-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--snd-text-muted);
}

/* ============================================================
   Messages (success / error)
   ============================================================ */
.snd-quote-messages {
    margin-bottom: 20px;
}
.snd-quote-message {
    padding: 16px 20px;
    border-radius: var(--snd-radius);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.snd-quote-message-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
    margin-top: 1px;
}
.snd-quote-message-content {
    flex: 1;
}
.snd-quote-message-success {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #1b5e20;
}
.snd-quote-message-error {
    background: var(--snd-primary-light);
    border-color: #f8c9cd;
    color: #7e1420;
}
.snd-quote-message ul {
    margin: 6px 0 0;
    padding-left: 20px;
}
.snd-quote-message strong {
    display: block;
    margin-bottom: 2px;
}

/* ============================================================
   Loading state during submission
   ============================================================ */
.snd-quote-form.snd-quote-submitting {
    opacity: 0.6;
    pointer-events: none;
}
.snd-quote-submit-button.snd-quote-loading {
    position: relative;
    color: transparent;
}
.snd-quote-submit-button.snd-quote-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: snd-quote-spin 0.7s linear infinite;
}
@keyframes snd-quote-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Honeypot (hidden)
   ============================================================ */
.snd-quote-honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ============================================================
   No products fallback
   ============================================================ */
.snd-quote-no-products {
    padding: 40px 20px;
    text-align: center;
    color: var(--snd-text-muted);
    background: var(--snd-bg-section);
    border-radius: var(--snd-radius);
    font-size: 14px;
    margin: 0;
}

/* ============================================================
   Admin preview notice (when admin views the form on the frontend)
   ============================================================ */
.snd-quote-admin-notice {
    padding: 12px 16px;
    background: var(--snd-accent-light);
    border-left: 3px solid var(--snd-accent);
    border-radius: var(--snd-radius);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--snd-accent);
}

/* ============================================================
   Responsive — Tablet (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
    /* Tighten product row column widths on tablet */
    .snd-quote-product-row {
        grid-template-columns: 80px 1fr 100px 90px 90px;
        gap: 12px;
        padding: 10px 14px;
    }
    .snd-quote-product-image {
        width: 80px;
        height: 80px;
    }
}

/* ============================================================
   Responsive — Mobile (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    .snd-quote-form-wrap {
        padding: 0 10px;
        font-size: 14px;
    }
    .snd-quote-form-heading {
        font-size: 20px;
        margin-bottom: 2px;
    }
    .snd-quote-form-subheading {
        font-size: 12px;
        margin-bottom: 16px;
    }

    /* Sections - tighter, less padding */
    .snd-quote-section {
        padding: 14px 12px;
        margin-bottom: 12px;
        border-radius: 8px;
    }
    .snd-quote-section-heading {
        font-size: 14px;
        gap: 8px;
        margin: 0 0 4px;
    }
    .snd-quote-section-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    .snd-quote-section-intro {
        padding-left: 0;
        margin: 0 0 12px;
        font-size: 12px;
        line-height: 1.4;
    }

    /* Product list - tight gap */
    .snd-quote-products-list {
        gap: 6px;
    }

    /* Product row - horizontal layout, compact */
    .snd-quote-product-row {
        grid-template-columns: 52px 1fr 90px;
        grid-template-rows: auto auto;
        gap: 4px 10px;
        padding: 10px;
        align-items: center;
    }
    .snd-quote-product-image {
        width: 52px;
        height: 52px;
        grid-row: 1 / span 2;
        grid-column: 1;
        align-self: center;
        padding: 3px;
        border-radius: 6px;
    }
    .snd-quote-product-info {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        padding: 0;
    }
    .snd-quote-product-title {
        font-size: 12px;
        line-height: 1.3;
        font-weight: 600;
        margin: 0;
    }
    .snd-quote-product-description {
        display: none;
    }

    /* Price below title in column 2 */
    .snd-quote-product-price {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        gap: 4px;
        align-items: baseline;
        text-align: left;
        padding: 0;
        margin: 0;
        border: none;
    }
    .snd-quote-product-price::before {
        display: none;
    }
    .snd-quote-price-amount {
        display: inline;
        font-size: 12px;
        font-weight: 600;
        color: var(--snd-text);
    }
    .snd-quote-price-unit {
        display: inline;
        font-size: 10px;
        margin: 0;
        color: var(--snd-text-muted);
    }

    /* Qty input on right - column 3, spans 2 rows, single compact box */
    .snd-quote-product-qty {
        grid-column: 3;
        grid-row: 1 / span 2;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        padding: 0;
        margin: 0;
        border: none;
        gap: 2px;
    }
    .snd-quote-product-qty::before {
        content: 'Qty';
        font-size: 9px;
        font-weight: 600;
        color: var(--snd-text-light);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: center;
        margin: 0;
    }
    .snd-quote-qty-input {
        width: 100%;
        padding: 6px 4px;
        font-size: 15px;
        font-weight: 600;
        text-align: center;
        height: 36px;
    }

    /* Line total: small row at bottom, full width */
    .snd-quote-product-total {
        display: none; /* hidden on mobile to save space - shown only when qty > 0 */
    }
    .snd-quote-product-row.snd-quote-has-qty .snd-quote-product-total {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
        padding: 6px 0 0;
        margin-top: 4px;
        border-top: 1px dashed var(--snd-border-light);
    }
    .snd-quote-subtotal-label {
        display: inline;
        margin: 0;
        font-size: 11px;
        text-transform: none;
        letter-spacing: 0;
        font-weight: 500;
        color: var(--snd-text-muted);
    }
    .snd-quote-subtotal-label::after {
        content: ':';
    }
    .snd-quote-line-total {
        display: inline;
        font-size: 14px;
        font-weight: 600;
    }

    /* Section subtotal - subtle, not loud */
    .snd-quote-section-subtotal {
        padding: 10px 12px;
        font-size: 12px;
        margin-top: 12px;
        font-weight: 500;
    }
    .snd-quote-section-subtotal .snd-quote-section-total {
        font-size: 14px;
        font-weight: 600;
    }

    /* Customer info fields */
    .snd-quote-section-customer .snd-quote-fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .snd-quote-field label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .snd-quote-form-wrap input[type="text"],
    .snd-quote-form-wrap input[type="email"],
    .snd-quote-form-wrap input[type="tel"],
    .snd-quote-form-wrap input[type="number"],
    .snd-quote-form-wrap select,
    .snd-quote-form-wrap textarea {
        font-size: 16px; /* prevents iOS zoom */
        padding: 9px 12px;
    }

    /* Radio cards stack on mobile */
    .snd-quote-radio-group {
        flex-direction: column;
        gap: 6px;
    }
    .snd-quote-radio-option-label {
        padding: 11px 14px;
        font-size: 13px;
    }

    /* Summary card */
    .snd-quote-summary {
        padding: 16px 18px;
        margin: 16px 0;
        position: relative;
        bottom: auto;
        border-radius: 10px;
    }
    .snd-quote-summary-row {
        font-size: 12px;
    }
    .snd-quote-grand-total-label {
        font-size: 11px;
    }
    .snd-quote-grand-total-amount {
        font-size: 22px;
    }

    /* Submit */
    .snd-quote-submit-button {
        width: 100%;
        min-width: 0;
        padding: 13px 20px;
        font-size: 14px;
    }
    .snd-quote-submit-note {
        font-size: 11px;
        margin-top: 8px;
    }

    .snd-quote-form-message.is-error,
    .snd-quote-form-message.is-success,
    .snd-quote-form-message.is-info {
        padding: 11px 13px;
        font-size: 12px;
    }
}

/* ============================================================
   Responsive — Small mobile (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .snd-quote-form-wrap {
        padding: 0 8px;
    }
    .snd-quote-form-heading {
        font-size: 18px;
    }

    .snd-quote-section {
        padding: 12px 10px;
    }
    .snd-quote-section-heading {
        font-size: 13px;
    }
    .snd-quote-section-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    /* Even tighter product rows on small phones */
    .snd-quote-product-row {
        grid-template-columns: 44px 1fr 78px;
        padding: 8px;
        gap: 3px 8px;
    }
    .snd-quote-product-image {
        width: 44px;
        height: 44px;
    }
    .snd-quote-product-title {
        font-size: 11.5px;
    }
    .snd-quote-price-amount {
        font-size: 11px;
    }
    .snd-quote-price-unit {
        font-size: 10px;
    }
    .snd-quote-qty-input {
        font-size: 14px;
        height: 32px;
    }

    .snd-quote-grand-total-amount {
        font-size: 20px;
    }
    .snd-quote-summary {
        padding: 14px 14px;
    }
}

/* ============================================================
   Validation error state
   ============================================================ */
.snd-quote-form-wrap input.snd-quote-error,
.snd-quote-form-wrap select.snd-quote-error,
.snd-quote-form-wrap textarea.snd-quote-error {
    border-color: var(--snd-primary);
    background: var(--snd-primary-light);
}
.snd-quote-form-wrap input.snd-quote-error:focus,
.snd-quote-form-wrap select.snd-quote-error:focus,
.snd-quote-form-wrap textarea.snd-quote-error:focus {
    box-shadow: 0 0 0 3px rgba(191, 30, 46, 0.18);
}
.snd-quote-form-wrap .snd-quote-radio-group.snd-quote-error .snd-quote-radio-option-label {
    border-color: var(--snd-primary);
}

/* Inline form message at bottom */
.snd-quote-form-message:not(:empty) {
    margin-top: 16px;
}
.snd-quote-form-message .snd-quote-message-error,
.snd-quote-form-message .snd-quote-message-success {
    margin: 0;
}

/* Line total has value highlight */
.snd-quote-line-total.has-value {
    color: var(--snd-primary);
}

/* ============================================================
   JS-applied message states (backwards-compat with existing JS)
   ============================================================ */
.snd-quote-form-message {
    margin-top: 0;
}
.snd-quote-form-message:empty {
    display: none !important;
}
.snd-quote-form-message.is-error {
    background: var(--snd-primary-light);
    border: 1px solid #f8c9cd;
    color: #7e1420;
    padding: 16px 20px;
    border-radius: var(--snd-radius);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 16px;
}
.snd-quote-form-message.is-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #1b5e20;
    padding: 16px 20px;
    border-radius: var(--snd-radius);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 16px;
    font-weight: 500;
}
.snd-quote-form-message.is-info {
    background: var(--snd-accent-light);
    border: 1px solid #c6dbef;
    color: var(--snd-accent);
    padding: 16px 20px;
    border-radius: var(--snd-radius);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 16px;
}

/* ============================================================
   Tracking page ([sndquote_track])
   ============================================================ */
.snd-quote-track-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}
/* When there's no sidebar (account/contact disabled), UPS form goes full width */
.snd-quote-track-grid-single {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin: 0 auto;
}

.snd-quote-track-ups-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #351c15;
    color: #ffb500;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

.snd-quote-track-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.snd-quote-track-input-row input[type="text"] {
    flex: 1;
}
.snd-quote-track-submit {
    flex-shrink: 0;
    min-width: 0;
    padding: 10px 24px;
    white-space: nowrap;
}

/* Contact box */
.snd-quote-track-contact-box {
    background: linear-gradient(135deg, var(--snd-primary) 0%, var(--snd-primary-dark) 100%);
    color: #fff;
    border-radius: var(--snd-radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--snd-shadow);
}
.snd-quote-track-contact-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}
.snd-quote-track-contact-sub {
    font-size: 13px;
    opacity: 0.9;
    margin: 0 0 8px;
}
.snd-quote-track-phone {
    display: inline-block;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
}
.snd-quote-track-phone:hover {
    text-decoration: underline;
    color: #fff;
}

/* Account login box */
.snd-quote-track-account-box {
    margin-bottom: 0;
}
.snd-quote-track-login-form .snd-quote-field {
    margin-bottom: 14px;
}
.snd-quote-track-login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}
.snd-quote-track-login-submit {
    min-width: 0;
    padding: 10px 28px;
}
.snd-quote-track-forgot {
    color: var(--snd-primary);
    font-size: 13px;
    text-decoration: none;
}
.snd-quote-track-forgot:hover {
    text-decoration: underline;
}

/* Tracking page responsive */
@media (max-width: 768px) {
    .snd-quote-track-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .snd-quote-track-input-row {
        flex-direction: column;
        gap: 10px;
    }
    .snd-quote-track-submit {
        width: 100%;
    }
    .snd-quote-track-login-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }
    .snd-quote-track-login-submit {
        width: 100%;
    }
    .snd-quote-track-forgot {
        text-align: center;
    }
}
