/* ── RFQ Page Styles ─────────────────────────────────────────────────────────── */

/* Success summary grid — single column on mobile */
@media (max-width: 540px) {
    #rfq-success-summary {
        grid-template-columns: 1fr !important;
    }
}

body {
    font-family: 'Roboto', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif !important;
}

.wizard-container,
.wizard-container input,
.wizard-container select,
.wizard-container select option,
.wizard-container textarea,
.wizard-container label,
.wizard-container button {
    font-family: 'Open Sans Condensed', 'Open Sans', sans-serif !important;
}

:root {
    --wizard-blue: #3949ab;
}

.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    padding: 40px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s;
}

.wizard-step.active {
    display: block;
}

.form-section {
    margin-bottom: 36px;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--wizard-blue);
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Service Thumbnail Rows */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

@media (max-width: 767px) and (min-width: 601px) {
    .service-grid { grid-template-columns: 1fr 1fr; }
}

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

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

.service-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1.5px solid #e4e4e4;
    border-radius: 7px;
    cursor: pointer;
    background: #fafafa;
    color: #333;
    transition: all 0.18s ease;
    user-select: none;
    position: relative;
}

.service-card:hover {
    border-color: var(--wizard-blue);
    background: #f0f2ff;
}

.service-card.selected {
    border-color: var(--wizard-blue);
    background: #eef0fb;
}

.service-thumb {
    width: 44px;
    height: 44px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.service-name {
    font-size: 0.83rem;
    font-weight: 600;
    flex: 1;
    letter-spacing: 0.1px;
}

.service-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
    font-size: 9px;
    color: transparent;
}

.service-card.selected .service-check {
    background: var(--wizard-blue);
    border-color: var(--wizard-blue);
    color: #fff;
}

.service-card.selected .service-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.btn-wizard {
    background-color: var(--wizard-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.btn-wizard:hover {
    background-color: #303f9f;
    color: white;
}

.btn-wizard:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-wizard.loading {
    opacity: 0.55;
    position: relative;
    padding-right: 40px !important;
    pointer-events: none;
}
.btn-wizard.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

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

.btn-outline-wizard {
    background-color: transparent;
    color: #555;
    border: 2px solid #ddd;
    padding: 8px 22px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-outline-wizard:hover {
    border-color: #555;
    color: #333;
}

.form-control {
    margin-bottom: 15px;
}

.wizard-container input.form-control,
.wizard-container select.form-control,
.wizard-container textarea.form-control {
    color: #1a1a1a !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.95rem !important;
    -webkit-text-fill-color: #1a1a1a !important;
    opacity: 1 !important;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #444;
    margin-bottom: 4px;
}

/* Time scroller */
.time-scroller-wrap {
    position: relative;
}

.time-scroller-wrap .form-control[readonly] {
    background: #fff;
    cursor: pointer;
}

.time-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 999;
    scroll-behavior: smooth;
}

.time-dropdown.open {
    display: block;
}

.time-option {
    padding: 7px 14px;
    font-size: 0.85rem;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 400;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s;
}

.time-option:hover,
.time-option.active {
    background: var(--wizard-blue);
    color: #fff;
}

.required-label::after {
    content: "*";
    color: red;
    margin-left: 4px;
}

.summary-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.btn-edit-section {
    font-size: 0.75rem;
    color: var(--wizard-blue);
    background: none;
    border: 1px solid var(--wizard-blue);
    border-radius: 4px;
    padding: 2px 10px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.btn-edit-section:hover {
    background: var(--wizard-blue);
    color: #fff;
}

.text-primary {
    color: var(--wizard-blue) !important;
}

.badge.bg-primary {
    background-color: var(--wizard-blue) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Venue "do you have a venue?" top section ── */
#venue-question-section {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 28px;
    transition: border-color 0.25s, box-shadow 0.25s;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
#venue-question-section.has-venue {
    border-color: #019CFC;
    box-shadow: 0 0 0 4px rgba(1,156,252,0.08);
}
#venue-question-section.no-venue {
    border-color: #019CFC;
    box-shadow: 0 0 0 4px rgba(1,156,252,0.08);
}
.vq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.vq-label-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.vq-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0d1f3c;
    margin: 0;
}
.vq-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #888;
    margin: 0;
}
/* iOS-style toggle */
.vq-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.vq-toggle-opt {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
    transition: color 0.2s;
    white-space: nowrap;
}
.vq-toggle-opt.active { color: #0d1f3c; }
.vq-switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}
.vq-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.vq-slider {
    position: absolute;
    inset: 0;
    background: #019CFC;
    border-radius: 28px;
    cursor: pointer;
    transition: background 0.25s;
}
.vq-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    top: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.vq-switch input:checked + .vq-slider {
    background: #019CFC;
}
.vq-switch input:checked + .vq-slider::before {
    transform: translateX(22px);
}
/* Expandable no-venue panel */
#vq-no-venue-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.38s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}
#vq-no-venue-panel.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 18px;
}
.vq-panel-inner {
    background: #f0f7ff;
    border: 1px solid #b3d9fc;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.vq-panel-inner > p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #1a3a5c;
    margin: 0;
    line-height: 1.65;
}
/* Recommend vs Browse button group */
.vq-action-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.vq-action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    padding: 14px 12px;
    background: #fff;
    border: 2px solid #d1d9e6;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    color: #6b7280;
}
.vq-action-btn:hover {
    border-color: #019CFC;
    background: #f0f7ff;
    color: #0d1f3c;
}
.vq-action-btn.active {
    border-color: #019CFC;
    background: #e8f4ff;
    color: #0d1f3c;
    box-shadow: 0 0 0 3px rgba(1,156,252,0.12);
}
.vq-action-btn-icon {
    font-size: 1.2rem;
    line-height: 1;
    color: #019CFC;
}
.vq-action-btn.active .vq-action-btn-icon { color: #019CFC; }
.vq-action-btn-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.vq-action-btn-sub {
    font-size: 0.7rem;
    color: #aaa;
    line-height: 1.3;
}
.vq-action-btn.active .vq-action-btn-sub { color: #5a8ab0; }
@media (max-width: 480px) {
    .vq-action-btn-group { grid-template-columns: 1fr; }
}
/* Browse link shown when toggle is on "Browse" */
#vq-browse-link-wrap {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}
#vq-browse-link-wrap.open {
    max-height: 60px;
    opacity: 1;
}
.btn-vq-browse {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #7c3aed;
    color: #fff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 9px 18px;
    border-radius: 6px;
    transition: background 0.2s;
}
.btn-vq-browse:hover { background: #5b21b6; }
.vq-recommend-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vq-recommend-note i { color: #019CFC; }
/* Venue input row — hidden when no-venue is active */
#vq-venue-input-row {
    display: grid;
}

/* ── iOS Safari date input fix ──────────────────────────────────────────────
   On iOS Safari, input[type="date"] has an intrinsic native width that
   ignores width:100% unless -webkit-appearance:none is applied.
   Also, grid/flex cells need min-width:0 to prevent blowout beyond 1fr.
   ─────────────────────────────────────────────────────────────────────────── */

/* Force date inputs to respect their container width.
   -webkit-appearance:none fixes the iOS Safari intrinsic-width bug but strips
   the native chrome that provides height/padding, so we restore those
   explicitly to match the other form fields (padding:11px 13px). */
#rfq-date-start,
#rfq-date-end {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 11px 13px;
    min-height: 44px;
    line-height: 1.4;
}

/* iOS Safari: the internal date value element must also fill width */
#rfq-date-start::-webkit-date-and-time-value,
#rfq-date-end::-webkit-date-and-time-value {
    width: 100%;
    text-align: left;
}

/* Grid cells containing date inputs must not blow out beyond their 1fr track */
#rfq-event-type-row > div {
    min-width: 0;
    overflow: hidden;
}

/* Prevent the row container itself from overflowing */
#rfq-event-type-row {
    overflow: hidden;
}

/* Mobile: collapse the 3-col event-type row to single column on small screens */
@media (max-width: 600px) {
    #rfq-event-type-row {
        grid-template-columns: 1fr !important;
    }
}
