/* ============================================================
   EPB Quote Form (Web3Forms)
   Brand: Manrope font, #1c48a4 primary blue, #ed1c24 action red
   ============================================================ */

.epb-quote-form {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    width: 100%;
    color: #1f2937;
    box-sizing: border-box;
}

.epb-quote-form *,
.epb-quote-form *::before,
.epb-quote-form *::after {
    box-sizing: border-box;
}

/* --- Layout --- */
.epb-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .epb-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.epb-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    min-width: 0; /* prevent grid blowout on long content */
}

.epb-form-row .epb-form-group {
    margin-bottom: 0;
}

/* --- Labels --- */
.epb-form-group > label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1.3;
}

.epb-required {
    color: #ed1c24;
    font-weight: 700;
}

.epb-optional {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* --- Inputs / select / textarea --- */
.epb-form-group input,
.epb-form-group select,
.epb-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: #f5f7fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.epb-form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.epb-form-group input::placeholder,
.epb-form-group textarea::placeholder {
    color: #9ca3af;
}

/* Custom select chevron (replaces inconsistent OS dropdown arrow) */
.epb-form-group select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231c48a4' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Focus state — primary blue */
.epb-form-group input:focus,
.epb-form-group select:focus,
.epb-form-group textarea:focus {
    outline: none;
    border-color: #1c48a4;
    box-shadow: 0 0 0 3px rgba(28, 72, 164, 0.12);
    background: #ffffff;
}

/* Invalid state — action red */
.epb-form-group.is-invalid input,
.epb-form-group.is-invalid select,
.epb-form-group.is-invalid textarea {
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.10);
}

.epb-field-error {
    font-size: 0.8125rem;
    color: #ed1c24;
    margin-top: 4px;
    display: none;
    font-weight: 500;
}

.epb-form-group.is-invalid .epb-field-error {
    display: block;
}

/* --- File upload --- */
.epb-file-zone {
    position: relative;
}

.epb-file-zone input[type="file"] {
    position: absolute;
    left: -9999px;
    /* Visually hidden but keyboard-accessible via the label */
}

.epb-file-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 14px;
    background: #f5f7fa;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    color: #1c48a4;
    font-weight: 600;
    font-size: 0.9375rem;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.epb-file-trigger:hover,
.epb-file-zone.is-dragover .epb-file-trigger {
    border-color: #1c48a4;
    background: #eff6ff;
}

.epb-file-zone input[type="file"]:focus + .epb-file-trigger {
    border-color: #1c48a4;
    box-shadow: 0 0 0 3px rgba(28, 72, 164, 0.12);
}

.epb-file-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.epb-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.epb-file-list li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.epb-file-list li small {
    color: #6b7280;
    margin-left: 6px;
}

.epb-file-remove {
    background: none;
    border: 0;
    color: #ed1c24;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.epb-file-remove:hover {
    background: rgba(237, 28, 36, 0.08);
}

.epb-file-remove:focus {
    outline: 2px solid #ed1c24;
    outline-offset: 2px;
}

/* --- Submit button — red default, blue on hover (matches site .btn-red) --- */
.epb-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: #ed1c24;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    line-height: 1.2;
}

.epb-submit-btn:hover:not(:disabled) {
    background: #1c48a4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 72, 164, 0.20);
}

.epb-submit-btn:focus-visible {
    outline: 3px solid #1c48a4;
    outline-offset: 2px;
}

.epb-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.epb-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: epb-spin 0.7s linear infinite;
}

.epb-quote-form.is-submitting .epb-submit-spinner {
    display: inline-block;
}

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

/* --- Honeypot — visually hidden but stays in DOM so bots find it --- */
.epb-honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- Status banner --- */
.epb-form-status {
    display: none;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.epb-form-status.is-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.epb-form-status.is-success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.epb-form-status a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

/* --- Disclaimer --- */
.epb-form-disclaimer {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 12px;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.5;
}

.epb-form-disclaimer a {
    color: #1c48a4;
    text-decoration: underline;
}

.epb-form-disclaimer a:hover {
    color: #ed1c24;
}

/* ============================================================
   Thank-you page (/thank-you/)
   ============================================================ */

.thank-you-section {
    padding: 80px 0;
    background: #f8f9fa;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.thank-you-card {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 48px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    animation: epb-fade-in-up 0.5s ease-out;
}

@keyframes epb-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.thank-you-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: #ecfdf5;
    border-radius: 50%;
    margin-bottom: 24px;
}

.thank-you-card h1 {
    font-size: 1.75rem;
    color: #1c48a4;
    margin: 0 0 16px;
    font-weight: 700;
    line-height: 1.2;
}

.thank-you-message {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 32px;
}

.thank-you-message strong {
    color: #1f2937;
}

.thank-you-cta {
    margin: 32px 0 24px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
}

.thank-you-cta .cta-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 12px;
    font-weight: 600;
}

.thank-you-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.thank-you-back {
    display: inline-block;
    color: #1c48a4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-top: 16px;
    padding: 8px 16px;
    transition: color 0.15s ease;
}

.thank-you-back:hover {
    color: #ed1c24;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .thank-you-section { padding: 48px 0; }
    .thank-you-card    { padding: 32px 20px; }
    .thank-you-card h1 { font-size: 1.5rem; }
    .thank-you-icon    { width: 80px; height: 80px; }
    .thank-you-icon svg { width: 60px; height: 60px; }
}
