/* ==========================================================================
   Trailer Reservation Wizard (.arr)
   AlphaRentals
   ========================================================================== */

.arr {
    --arr-primary: #FF6B00;
    --arr-primary-dark: #E25E00;
    --arr-text: #0f172a;
    --arr-text-muted: #475569;
    --arr-border: #e5e7eb;
    --arr-bg: #ffffff;
    --arr-bg-soft: #f9fafb;
    --arr-bg-soft-hover: #f3f4f6;
    --arr-accent: #fff5ee;
    --arr-success: #16a34a;
    --arr-error: #dc2626;
    --arr-shadow: 0 12px 32px -16px rgba(15, 23, 42, .18);
    --arr-radius: 14px;

    box-sizing: border-box;
    color: var(--arr-text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

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

.arr__inner {
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(28px, 4vw, 56px) clamp(16px, 3vw, 32px);
    background: var(--arr-bg);
    border: 1px solid var(--arr-border);
    border-radius: calc(var(--arr-radius) + 4px);
    box-shadow: var(--arr-shadow);
}

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

.arr__header {
    text-align: center;
    margin-bottom: clamp(24px, 3vw, 36px);
}

.arr__eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 12px;
    font-weight: 600;
    color: var(--arr-primary);
    background: var(--arr-accent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.arr__title {
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 800;
    line-height: 1.18;
    color: var(--arr-text);
    margin: 0 0 12px;
}

.arr__title-hl {
    color: var(--arr-primary);
}

.arr__intro {
    color: var(--arr-text-muted);
    margin: 0 auto;
    max-width: 720px;
    font-size: 16px;
}

/* ---------- Stepper ---------- */

.arr__stepper {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0 0 clamp(24px, 3vw, 36px);
    list-style: none;
    counter-reset: arr-step;
    border-radius: var(--arr-radius);
    overflow: hidden;
    background: var(--arr-bg-soft);
    border: 1px solid var(--arr-border);
}

.arr__step {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 0;
    padding: 14px 18px;
    border-right: 1px solid var(--arr-border);
    transition: background-color .25s ease, color .25s ease;
    min-width: 0;
}

.arr__step:last-child {
    border-right: 0;
}

.arr__step.is-active {
    background: var(--arr-primary);
    color: #fff;
}

.arr__step.is-complete {
    background: #ecfdf5;
    color: #065f46;
}

.arr__step-num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .08);
    color: var(--arr-text);
    font-weight: 700;
    font-size: 14px;
    transition: background-color .25s ease, color .25s ease;
}

.arr__step.is-active .arr__step-num {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.arr__step.is-complete .arr__step-num {
    background: #10b981;
    color: #fff;
}

.arr__step-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.arr__step-label {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    font-weight: 700;
    opacity: .85;
}

.arr__step-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .arr__stepper {
        flex-wrap: wrap;
    }
    .arr__step {
        flex: 1 1 100%;
        border-right: 0;
        border-bottom: 1px solid var(--arr-border);
    }
    .arr__step:last-child {
        border-bottom: 0;
    }
    .arr__step-title {
        white-space: normal;
    }
}

/* ---------- Panels ---------- */

.arr__form {
    margin: 0;
}

.arr__panel {
    display: none;
}

.arr__panel.is-active {
    display: block;
    animation: arr-fade .35s ease;
}

@keyframes arr-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.arr__panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.arr__panel-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--arr-text);
}

.arr__panel-pill {
    display: inline-flex;
    align-items: center;
    background: var(--arr-accent);
    color: var(--arr-primary);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: capitalize;
}

.arr__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--arr-border);
    color: var(--arr-text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.arr__back:hover {
    background: var(--arr-bg-soft);
    border-color: #cbd5e1;
}

.arr__back svg {
    width: 16px;
    height: 16px;
}

.arr__empty {
    text-align: center;
    color: var(--arr-text-muted);
    font-size: 15px;
    padding: 40px 16px;
    border: 1px dashed var(--arr-border);
    border-radius: var(--arr-radius);
}

/* ---------- Step 1: categories ---------- */

.arr__categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.arr__category-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--arr-bg);
    border: 1px solid var(--arr-border);
    border-radius: var(--arr-radius);
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    width: 100%;
    font: inherit;
    color: inherit;
}

.arr__category-card:hover,
.arr__category-card:focus-visible {
    border-color: var(--arr-primary);
    box-shadow: 0 8px 24px -10px rgba(255, 107, 0, .35);
    transform: translateY(-2px);
    outline: none;
}

.arr__category-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: var(--arr-accent);
    color: var(--arr-primary);
    border-radius: 14px;
}

.arr__category-icon svg {
    width: 28px;
    height: 28px;
}

.arr__category-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.arr__category-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--arr-text);
}

.arr__category-desc {
    font-size: 13px;
    color: var(--arr-text-muted);
    line-height: 1.4;
}

.arr__category-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--arr-primary);
    margin-top: 4px;
}

.arr__category-arrow {
    flex: 0 0 auto;
    color: var(--arr-text-muted);
    transition: transform .2s ease, color .2s ease;
}

.arr__category-card:hover .arr__category-arrow {
    color: var(--arr-primary);
    transform: translateX(3px);
}

.arr__category-arrow svg {
    width: 22px;
    height: 22px;
}

/* ---------- Step 2: trailers ---------- */

.arr__trailers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.arr__trailer {
    display: flex;
    flex-direction: column;
    background: var(--arr-bg);
    border: 1px solid var(--arr-border);
    border-radius: var(--arr-radius);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.arr__trailer:hover {
    border-color: var(--arr-primary);
    box-shadow: 0 12px 32px -16px rgba(255, 107, 0, .35);
    transform: translateY(-2px);
}

.arr__trailer[hidden] {
    display: none !important;
}

.arr__trailer-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--arr-bg-soft);
    overflow: hidden;
}

.arr__trailer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.arr__trailer:hover .arr__trailer-image img {
    transform: scale(1.04);
}

.arr__trailer-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.arr__trailer-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1 1 auto;
}

.arr__trailer-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--arr-text);
}

.arr__trailer-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.arr__trailer-specs li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--arr-bg-soft);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--arr-text);
}

.arr__chip-icon {
    color: var(--arr-primary);
    display: inline-flex;
}

.arr__chip-icon svg {
    width: 13px;
    height: 13px;
}

.arr__chip-label {
    color: var(--arr-text-muted);
    font-weight: 500;
}

.arr__chip-value {
    font-weight: 700;
}

.arr__trailer-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.arr__trailer-features li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--arr-success);
    font-weight: 600;
}

.arr__trailer-features svg {
    width: 13px;
    height: 13px;
}

.arr__trailer-select {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 10px 16px;
    background: var(--arr-text);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease;
}

.arr__trailer-select:hover {
    background: var(--arr-primary);
}

.arr__trailer-select svg {
    width: 16px;
    height: 16px;
}

.arr__no-results {
    text-align: center;
    color: var(--arr-text-muted);
    padding: 30px 0;
    font-size: 15px;
}

/* ---------- Step 3: form ---------- */

.arr__summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--arr-bg-soft);
    border: 1px solid var(--arr-border);
    border-radius: var(--arr-radius);
    margin-bottom: 22px;
}

.arr__summary-image {
    flex: 0 0 auto;
    width: 88px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #e5e7eb;
}

.arr__summary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arr__summary-image img[src=""] {
    display: none;
}

.arr__summary-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
    min-width: 0;
}

.arr__summary-eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .12em;
    font-weight: 700;
    color: var(--arr-primary);
}

.arr__summary-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--arr-text);
    word-break: break-word;
}

.arr__summary-meta {
    font-size: 13px;
    color: var(--arr-text-muted);
}

.arr__fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
}

@media (max-width: 640px) {
    .arr__fields {
        grid-template-columns: 1fr;
    }
}

.arr__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arr__field--wide {
    grid-column: 1 / -1;
}

.arr__field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--arr-text);
}

.arr__field input,
.arr__field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--arr-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--arr-text);
    background: var(--arr-bg);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.arr__field input:focus,
.arr__field textarea:focus {
    outline: none;
    border-color: var(--arr-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, .14);
}

.arr__field--checkbox label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 500;
    color: var(--arr-text-muted);
    line-height: 1.45;
    cursor: pointer;
}

.arr__field--checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--arr-primary);
    flex: 0 0 auto;
}

.arr__field-error {
    color: var(--arr-error);
    font-size: 12px;
    margin: 0;
}

.arr__field input.is-invalid,
.arr__field textarea.is-invalid {
    border-color: var(--arr-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.arr__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.arr__phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--arr-text);
    background: var(--arr-bg-soft);
    border: 1px solid var(--arr-border);
    padding: 10px 14px;
    border-radius: 12px;
    transition: background-color .2s ease, color .2s ease;
}

.arr__phone:hover {
    background: var(--arr-accent);
    color: var(--arr-primary);
}

.arr__phone svg {
    width: 18px;
    height: 18px;
    color: var(--arr-primary);
    flex: 0 0 auto;
}

.arr__phone span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.arr__phone-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--arr-text-muted);
}

.arr__phone-num {
    font-weight: 700;
    font-size: 14px;
}

.arr__submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    background: var(--arr-primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.arr__submit:hover {
    background: var(--arr-primary-dark);
}

.arr__submit:active {
    transform: scale(.98);
}

.arr__submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.arr__submit-spinner {
    display: none;
    animation: arr-spin .9s linear infinite;
}

.arr__submit.is-loading .arr__submit-spinner {
    display: inline-block;
}

.arr__submit.is-loading .arr__submit-text {
    opacity: .7;
}

@keyframes arr-spin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

.arr__form-feedback {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.arr__form-feedback[data-arr-state="error"] {
    background: #fef2f2;
    color: var(--arr-error);
    border: 1px solid #fecaca;
}

/* ---------- Success ---------- */

.arr__panel--success {
    text-align: center;
    padding: clamp(24px, 4vw, 48px) 16px;
}

.arr__success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dcfce7;
    color: var(--arr-success);
}

.arr__success-icon svg {
    width: 38px;
    height: 38px;
}

.arr__success-title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 800;
    color: var(--arr-text);
}

.arr__success-text {
    margin: 0 auto 22px;
    color: var(--arr-text-muted);
    max-width: 540px;
}

.arr__restart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--arr-text);
    color: #fff;
    border: 0;
    padding: 11px 22px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease;
}

.arr__restart:hover {
    background: var(--arr-primary);
}
