/* WPW Service Area Validator — travel quote widget (shortcode + product booking). */

.wpw-tq [hidden],
.wpw-product-booking [hidden] {
    display: none !important;
}

.wpw-tq {
    --wpw-tq-accent: #1d4ed8;
    --wpw-tq-accent-contrast: #ffffff;
    --wpw-tq-border: #c7cbd1;
    --wpw-tq-radius: 8px;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--wpw-tq-border);
    border-radius: var(--wpw-tq-radius);
    background: #fff;
}

.wpw-tq__title {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.wpw-tq__intro {
    margin: 0 0 16px;
    color: #4b5563;
}

.wpw-tq__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.wpw-tq__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: 12px;
}

.wpw-tq__field--grow {
    flex: 1 1 260px;
}

.wpw-tq__field--dogs {
    flex: 0 0 140px;
}

.wpw-tq__field--submit {
    flex: 0 0 auto;
}

.wpw-tq__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.wpw-tq__input,
.wpw-tq__dogs,
.wpw-tq__program,
.wpw-product-booking__date {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 1rem; /* >=16px avoids iOS zoom on focus */
    border: 1px solid #8a9099;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    box-sizing: border-box;
    width: 100%;
}

.wpw-tq__input[aria-invalid="true"] {
    border-color: #b91c1c;
    box-shadow: 0 0 0 1px #b91c1c;
}

.wpw-tq__submit,
.wpw-tq__cta,
.wpw-product-booking__slot,
.wpw-product-booking__check-btn,
.wpw-product-booking__add-btn {
    min-height: 44px;
    min-width: 44px;
}

.wpw-tq__submit,
.wpw-tq__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 2px solid var(--wpw-tq-accent, #1d4ed8);
    border-radius: 6px;
    background: var(--wpw-tq-accent, #1d4ed8);
    color: var(--wpw-tq-accent-contrast, #fff);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.wpw-tq__submit[disabled] {
    opacity: .7;
    cursor: progress;
}

.wpw-tq__cta--alternative,
.wpw-tq__cta--book {
    background: #fff;
    color: var(--wpw-tq-accent, #1d4ed8);
}

/* Visible focus for everything interactive in the widget. */
.wpw-tq :focus-visible,
.wpw-product-booking :focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.wpw-tq__result:empty {
    display: none;
}

.wpw-tq__box {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    border-left-width: 5px;
    background: #f9fafb;
    color: #111827;
}

.wpw-tq__box--success {
    border-left-color: #15803d;
    background: #f0fdf4;
}

.wpw-tq__box--error {
    border-left-color: #b91c1c;
    background: #fef2f2;
}

.wpw-tq__box--warning {
    border-left-color: #b45309;
    background: #fffbeb;
}

.wpw-tq__box--info {
    border-left-color: #1d4ed8;
    background: #eff6ff;
}

.wpw-tq__message {
    margin: 0 0 8px;
    font-weight: 600;
}

.wpw-tq__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #92400e;
    color: #fff;
    font-size: .8rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    vertical-align: middle;
}

.wpw-tq__distance,
.wpw-tq__band,
.wpw-tq__note,
.wpw-tq__rule {
    margin: 0 0 8px;
    color: #374151;
}

.wpw-tq__note {
    font-size: .95rem;
}

.wpw-tq__lines {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
    background: #fff;
}

.wpw-tq__lines th,
.wpw-tq__lines td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-weight: normal;
    vertical-align: top;
}

.wpw-tq__lines td {
    text-align: right;
    white-space: nowrap;
}

.wpw-tq__line--total th,
.wpw-tq__line--total td {
    font-weight: 700;
    border-bottom: 0;
    border-top: 2px solid #111827;
}

.wpw-tq__payment {
    margin: 8px 0;
    font-size: .95rem;
}

.wpw-tq__payment-title {
    margin: 0 0 4px;
    font-weight: 600;
}

.wpw-tq__payment-list {
    margin: 0 0 0 1.2em;
}

.wpw-tq__bands {
    margin: 10px 0;
}

.wpw-tq__bands summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--wpw-tq-accent, #1d4ed8);
    font-weight: 600;
}

.wpw-tq__bands table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.wpw-tq__bands th,
.wpw-tq__bands td {
    padding: 6px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.wpw-tq__bands tr.is-active th,
.wpw-tq__bands tr.is-active td {
    font-weight: 700;
    background: #ecfdf5;
}

.wpw-tq__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

/* Autocomplete combobox */
.wpw-tq__ac-wrap {
    position: relative;
}

.wpw-tq__suggestions {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    right: 0;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #8a9099;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 260px;
    overflow-y: auto;
}

.wpw-tq__suggestion {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 0;
    cursor: pointer;
}

.wpw-tq__suggestion.is-active,
.wpw-tq__suggestion:hover {
    background: #e0e7ff;
}

.wpw-tq-admin-note {
    padding: 8px 12px;
    border: 1px dashed #b45309;
    background: #fffbeb;
}

.wpw-sav-price-on-request {
    font-size: .95em;
}

@media (max-width: 600px) {
    .wpw-tq,
    .wpw-product-booking {
        padding: 16px;
    }

    .wpw-tq__field--dogs,
    .wpw-tq__field--submit {
        flex: 1 1 100%;
    }

    .wpw-tq__submit,
    .wpw-product-booking__check-btn {
        width: 100%;
    }

    .wpw-tq__actions .wpw-tq__cta {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpw-tq *,
    .wpw-product-booking * {
        transition: none !important;
    }
}
