/* Reservation request + confirmation pages.
   Layout follows the familiar "confirm and pay" pattern: trip and guest details on the left,
   a sticky listing + price card on the right. Mobile first; colours come from the plugin settings. */

.vjv-request-wrap {
    --vjv-accent: var(--vjv-primary-color, #222222);
    --vjv-accent-text: var(--vjv-primary-text-color, #ffffff);
    --vjv-accent-soft: var(--vjv-primary-alpha-color, rgba(34, 34, 34, 0.08));
    --vjv-ink: #222222;
    --vjv-muted: #6a6a6a;
    --vjv-line: #dddddd;
    --vjv-field-line: #b0b0b0;
    --vjv-danger: #c13515;
    --vjv-radius: 12px;
    --vjv-radius-sm: 8px;

    box-sizing: border-box;
    container: vjv / inline-size;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 0 64px;
    color: var(--vjv-ink);
    font-size: 16px;
    line-height: 1.5;
}

/* Break out of narrow theme content areas so the two-column layout has room.
   Only on wider screens: phones keep the theme's own side padding.
   Doubled class so it outranks theme "content width" rules. */
@media (min-width: 768px) {
    .vjv-request-wrap.vjv-request-wrap--full {
        width: min(1120px, calc(100vw - 64px));
        max-width: none;
        margin-left: calc(50% - min(560px, 50vw - 32px));
        margin-right: 0;
    }
}

.vjv-request-wrap *,
.vjv-request-wrap *::before,
.vjv-request-wrap *::after {
    box-sizing: border-box;
}

.vjv-request-wrap [hidden] {
    display: none !important;
}

.vjv-request-wrap .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.vjv-request-wrap h1,
.vjv-request-wrap h2,
.vjv-request-wrap h3,
.vjv-request-wrap p {
    letter-spacing: normal;
    text-transform: none;
}

/* ---------- Layout ---------- */

.vjv-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "summary" "main";
    row-gap: 24px;
}

.vjv-request__header { grid-area: header; }
.vjv-request__summary { grid-area: summary; }
.vjv-request__main { grid-area: main; min-width: 0; }

@container vjv (min-width: 860px) {
    .vjv-request {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
        grid-template-areas: "header ." "main summary";
        column-gap: clamp(48px, 8cqw, 96px);
        row-gap: 40px;
        align-items: start;
    }
    .vjv-request__summary {
        position: sticky;
        top: 32px;
    }
}

/* ---------- Header ---------- */

.vjv-request__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vjv-request-wrap .vjv-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -8px;
    border-radius: 50%;
    color: var(--vjv-ink);
    text-decoration: none;
    transition: background-color 0.15s;
}

.vjv-request-wrap .vjv-back:hover,
.vjv-request-wrap .vjv-back:focus-visible {
    background: #f2f2f2;
    color: var(--vjv-ink);
}

.vjv-request-wrap .vjv-request-title {
    margin: 0;
    font-size: clamp(26px, 3.2cqw, 32px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--vjv-ink);
}

/* ---------- Listing + price card ---------- */

.vjv-summary {
    padding: 24px;
    border: 1px solid var(--vjv-line);
    border-radius: var(--vjv-radius);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.vjv-summary__listing {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--vjv-line);
}

.vjv-summary__image {
    flex: 0 0 auto;
    width: 112px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--vjv-radius-sm);
}

@container vjv (min-width: 860px) {
    .vjv-summary__image {
        width: 124px;
        height: 106px;
    }
}

.vjv-summary__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vjv-summary__kicker {
    color: var(--vjv-muted);
    font-size: 13px;
}

.vjv-summary__villa {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.vjv-request-wrap .vjv-summary__heading {
    margin: 24px 0 16px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vjv-ink);
}

.vjv-prices {
    margin: 0;
}

.vjv-prices__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.vjv-prices__row dt,
.vjv-prices__row dd {
    margin: 0;
    font-weight: 400;
    color: var(--vjv-ink);
}

.vjv-prices__row dd,
.vjv-prices__total strong {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vjv-prices__total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--vjv-line);
    font-weight: 700;
}

.vjv-request-wrap .vjv-summary__due {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: var(--vjv-radius-sm);
    background: var(--vjv-accent-soft);
    color: var(--vjv-ink);
    font-size: 14px;
}

/* ---------- Sections (left column) ---------- */

.vjv-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--vjv-line);
}

.vjv-trip {
    padding-top: 0;
}

.vjv-section--last {
    border-bottom: 0;
    padding-bottom: 0;
}

.vjv-request-wrap .vjv-section__title {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vjv-ink);
}

.vjv-request-wrap .vjv-section__intro {
    margin: -16px 0 16px;
    color: var(--vjv-muted);
}

/* ---------- Trip ---------- */

.vjv-trip__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.vjv-trip__row + .vjv-trip__row {
    margin-top: 24px;
}

.vjv-request-wrap .vjv-trip__label {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--vjv-ink);
}

.vjv-request-wrap .vjv-trip__value {
    margin: 4px 0 0;
    color: var(--vjv-ink);
}

.vjv-trip__editor {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--vjv-line);
    border-radius: var(--vjv-radius);
}

.vjv-trip__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.vjv-request-wrap .vjv-trip__error {
    margin: 0 0 12px;
    color: var(--vjv-danger);
    font-size: 15px;
}

/* ---------- Form ---------- */

.vjv-form__alert {
    margin: -8px 0 24px;
    padding: 12px 14px;
    border-radius: var(--vjv-radius-sm);
    background: #fff8f6;
    border: 1px solid #f5c2b8;
    color: var(--vjv-danger);
    font-size: 15px;
}

.vjv-fieldset {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    min-width: 0;
}

/* Themes often style <legend> with a border and large text; keep it a plain label. */
.vjv-request-wrap .vjv-fieldset legend.vjv-label {
    float: none;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    line-height: 1.5;
}

.vjv-grid {
    display: grid;
    gap: 0 16px;
    grid-template-columns: minmax(0, 1fr);
}

.vjv-grid--name {
    gap: 12px 12px;
}

@container vjv (min-width: 560px) {
    .vjv-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .vjv-grid--name {
        grid-template-columns: 112px repeat(2, minmax(0, 1fr));
    }
}

.vjv-field {
    margin: 0 0 20px;
    min-width: 0;
}

.vjv-grid--name .vjv-field {
    margin-bottom: 0;
}

.vjv-field--check {
    margin-bottom: 12px;
}

.vjv-field--narrow {
    max-width: 280px;
}

.vjv-request-wrap .vjv-label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--vjv-ink);
}

.vjv-req {
    color: var(--vjv-danger);
}

.vjv-request-wrap .vjv-input {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--vjv-field-line);
    border-radius: var(--vjv-radius-sm);
    background: #ffffff;
    color: var(--vjv-ink);
    font: inherit;
    font-size: 16px; /* stops iOS zooming into fields */
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.vjv-request-wrap select.vjv-input {
    padding-right: 36px;
}

.vjv-request-wrap textarea.vjv-input {
    min-height: 120px;
    resize: vertical;
}

.vjv-request-wrap .vjv-input:hover {
    border-color: var(--vjv-ink);
}

.vjv-request-wrap .vjv-input:focus {
    outline: none;
    border-color: var(--vjv-ink);
    box-shadow: 0 0 0 1px var(--vjv-ink);
}

.vjv-request-wrap .vjv-input[readonly] {
    cursor: pointer;
}

.vjv-field.has-error .vjv-input {
    border-color: var(--vjv-danger);
    background: #fff8f6;
}

.vjv-request-wrap .vjv-field__error {
    margin: 6px 0 0;
    color: var(--vjv-danger);
    font-size: 13px;
}

.vjv-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
}

.vjv-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--vjv-ink);
}

.vjv-check a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.vjv-request-wrap .vjv-form__fineprint {
    margin: 16px 0 0;
    color: var(--vjv-muted);
    font-size: 13px;
    line-height: 1.5;
}

.vjv-form__fineprint a {
    color: inherit;
}

/* Honeypot: hidden from people, visible to bots. */
.vjv-hp {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Buttons & links ---------- */

/* Many themes style every button/field (uppercase, tiny text, letter spacing, margins).
   These pages always look the same whatever the theme does. */
.vjv-request-wrap button,
.vjv-request-wrap input,
.vjv-request-wrap select,
.vjv-request-wrap textarea,
.vjv-request-wrap .vjv-button {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.vjv-request-wrap .vjv-button,
.vjv-request-wrap button.vjv-button,
.vjv-request-wrap a.vjv-button {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.vjv-request-wrap .vjv-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    border: 0;
    border-radius: var(--vjv-radius-sm);
    background: var(--vjv-accent);
    color: var(--vjv-accent-text);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s, transform 0.05s;
}

.vjv-request-wrap .vjv-button:hover {
    filter: brightness(1.08);
    color: var(--vjv-accent-text);
}

.vjv-request-wrap .vjv-button:active {
    transform: scale(0.98);
}

.vjv-request-wrap .vjv-button:focus-visible {
    outline: 2px solid var(--vjv-ink);
    outline-offset: 2px;
}

.vjv-request-wrap .vjv-button.is-busy,
.vjv-request-wrap .vjv-button:disabled {
    opacity: 0.7;
    cursor: progress;
}

.vjv-request-wrap .vjv-button--submit {
    width: 100%;
    margin: 24px 0 0 !important;
}

@container vjv (min-width: 560px) {
    .vjv-request-wrap .vjv-button--submit {
        width: auto;
        min-width: 220px;
    }
}

.vjv-request-wrap .vjv-link {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--vjv-ink);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.vjv-request-wrap .vjv-link:hover {
    color: #000000;
}

/* ---------- Notice (missing quote) ---------- */

.vjv-card {
    background: #ffffff;
    border: 1px solid var(--vjv-line);
    border-radius: var(--vjv-radius);
    padding: 32px 24px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.vjv-notice {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.vjv-notice h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
}

.vjv-notice p {
    margin: 0 0 24px;
    color: var(--vjv-muted);
}

/* ---------- Confirmation page ---------- */

.vjv-received {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.vjv-received__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--vjv-accent-soft);
    color: var(--vjv-accent);
}

.vjv-request-wrap .vjv-received__title {
    margin: 0 0 8px;
    font-size: clamp(26px, 4cqw, 32px);
    font-weight: 600;
    line-height: 1.2;
}

.vjv-request-wrap .vjv-received__lead {
    margin: 0 0 24px;
    color: var(--vjv-muted);
    font-size: 17px;
}

.vjv-received__lead strong {
    color: var(--vjv-ink);
}

.vjv-received__summary {
    display: grid;
    gap: 1px;
    margin: 0 0 24px;
    overflow: hidden;
    border: 1px solid var(--vjv-line);
    border-radius: var(--vjv-radius-sm);
    background: var(--vjv-line);
    text-align: left;
}

@container vjv (min-width: 560px) {
    .vjv-received__summary {
        grid-template-columns: 1fr 1fr;
    }
}

.vjv-received__summary div {
    padding: 12px 14px;
    background: #ffffff;
}

.vjv-received__summary dt {
    color: var(--vjv-muted);
    font-size: 13px;
}

.vjv-received__summary dd {
    margin: 0;
    font-weight: 600;
}

.vjv-steps {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: vjv-step;
    text-align: left;
}

.vjv-steps li {
    position: relative;
    padding: 0 0 14px 40px;
    counter-increment: vjv-step;
}

.vjv-steps li::before {
    content: counter(vjv-step);
    position: absolute;
    left: 0;
    top: -1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--vjv-accent);
    color: var(--vjv-accent-text);
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Confirmation page (two-column) ---------- */

/* On phones the next steps come before the price receipt. */
.vjv-received-page {
    grid-template-areas: "header" "main" "summary";
}

@container vjv (min-width: 860px) {
    /* Receipt card sits beside the heading, spanning both rows. */
    .vjv-received-page {
        grid-template-areas: "header summary" "main summary";
    }
    .vjv-received-page .vjv-request__summary {
        align-self: start;
    }
}

.vjv-request__header.vjv-received__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.vjv-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--vjv-accent-soft);
    color: var(--vjv-accent);
    font-size: 14px;
    font-weight: 600;
}

.vjv-received__header .vjv-request-title {
    max-width: 22ch;
}

.vjv-request-wrap .vjv-received__header .vjv-received__lead {
    max-width: 60ch;
    margin: 12px 0 0;
    font-size: 17px;
}

.vjv-summary__trip {
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--vjv-line);
}

.vjv-summary__trip div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.vjv-summary__trip dt {
    color: var(--vjv-muted);
}

.vjv-summary__trip dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.vjv-section--first {
    padding-top: 0;
}

.vjv-request-wrap .vjv-section__text {
    margin: 0;
}

.vjv-section__text a {
    color: var(--vjv-ink);
    font-weight: 600;
}

/* Timeline */
.vjv-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vjv-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 28px;
}

.vjv-timeline li:last-child {
    padding-bottom: 0;
}

/* Line joining the steps */
.vjv-timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: 4px;
    width: 2px;
    background: var(--vjv-line);
}

.vjv-timeline li.is-done:not(:last-child)::before {
    background: var(--vjv-accent);
}

.vjv-timeline__dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid var(--vjv-line);
    border-radius: 50%;
    background: #ffffff;
}

.vjv-timeline li.is-done .vjv-timeline__dot {
    border-color: var(--vjv-accent);
    background: var(--vjv-accent);
    color: var(--vjv-accent-text);
}

.vjv-timeline li.is-current .vjv-timeline__dot {
    border-color: var(--vjv-accent);
}

.vjv-timeline li.is-current .vjv-timeline__dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--vjv-accent);
}

.vjv-request-wrap .vjv-timeline h3 {
    margin: 4px 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--vjv-ink);
}

.vjv-request-wrap .vjv-timeline p {
    margin: 0;
    color: var(--vjv-muted);
}

.vjv-timeline p strong {
    color: var(--vjv-ink);
}

.vjv-received__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

@media print {
    .vjv-received__actions,
    .vjv-back {
        display: none !important;
    }
    .vjv-request__summary {
        position: static !important;
    }
    .vjv-summary {
        box-shadow: none;
    }
}
