/* ═══════════════════════════════════════════════════════════════
   HRD QUOTE FORM v2.0
   Dark & Light themes via [data-theme] attribute
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables: Dark Theme ─────────────────────────────── */
.hrd-quote-wrapper[data-theme="dark"] {
    --hrd-bg: #0f1a2e;
    --hrd-bg-card: rgba(255,255,255,0.06);
    --hrd-bg-card-hover: rgba(255,255,255,0.12);
    --hrd-bg-card-active: rgba(249,115,22,0.15);
    --hrd-bg-input: rgba(255,255,255,0.08);
    --hrd-bg-input-focus: rgba(255,255,255,0.12);
    --hrd-bg-dropdown: #1a2744;
    --hrd-border: rgba(255,255,255,0.12);
    --hrd-border-focus: #F97316;
    --hrd-border-active: #F97316;
    --hrd-text: #ffffff;
    --hrd-text-secondary: rgba(255,255,255,0.6);
    --hrd-text-hint: rgba(255,255,255,0.45);
    --hrd-text-input: #ffffff;
    --hrd-accent: #F97316;
    --hrd-accent-hover: #EA580C;
    --hrd-accent-glow: rgba(249,115,22,0.25);
    --hrd-btn-text: #0A0A0A;
    --hrd-btn-back-bg: transparent;
    --hrd-btn-back-border: rgba(255,255,255,0.25);
    --hrd-btn-back-text: rgba(255,255,255,0.7);
    --hrd-btn-back-hover: rgba(255,255,255,0.08);
    --hrd-success-bg: rgba(34,197,94,0.12);
    --hrd-success-border: rgba(34,197,94,0.3);
    --hrd-success-color: #22C55E;
    --hrd-shadow: 0 20px 60px rgba(0,0,0,0.4);
    --hrd-dropdown-shadow: 0 12px 40px rgba(0,0,0,0.5);
    --hrd-trust-bg: rgba(255,255,255,0.04);
}

/* ─── CSS Variables: Light Theme ────────────────────────────── */
.hrd-quote-wrapper[data-theme="light"] {
    --hrd-bg: #ffffff;
    --hrd-bg-card: #f8f9fa;
    --hrd-bg-card-hover: #f0f1f3;
    --hrd-bg-card-active: rgba(249,115,22,0.08);
    --hrd-bg-input: #f8f9fa;
    --hrd-bg-input-focus: #ffffff;
    --hrd-bg-dropdown: #ffffff;
    --hrd-border: #e2e5e9;
    --hrd-border-focus: #F97316;
    --hrd-border-active: #F97316;
    --hrd-text: #111827;
    --hrd-text-secondary: #6b7280;
    --hrd-text-hint: #9ca3af;
    --hrd-text-input: #111827;
    --hrd-accent: #F97316;
    --hrd-accent-hover: #EA580C;
    --hrd-accent-glow: rgba(249,115,22,0.15);
    --hrd-btn-text: #ffffff;
    --hrd-btn-back-bg: transparent;
    --hrd-btn-back-border: #d1d5db;
    --hrd-btn-back-text: #6b7280;
    --hrd-btn-back-hover: #f3f4f6;
    --hrd-success-bg: rgba(34,197,94,0.08);
    --hrd-success-border: rgba(34,197,94,0.2);
    --hrd-success-color: #16a34a;
    --hrd-shadow: 0 20px 60px rgba(0,0,0,0.08);
    --hrd-dropdown-shadow: 0 12px 40px rgba(0,0,0,0.12);
    --hrd-trust-bg: #f8f9fa;
}

/* ─── Base Wrapper ──────────────────────────────────────────── */
.hrd-quote-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--hrd-bg);
    border-radius: 16px;
    padding: 40px;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: var(--hrd-shadow);
    position: relative;
    overflow: visible;
}

.hrd-quote-wrapper *,
.hrd-quote-wrapper *::before,
.hrd-quote-wrapper *::after {
    box-sizing: border-box;
}

/* ─── Progress Bar ──────────────────────────────────────────── */
.hrd-progress {
    margin-bottom: 36px;
}

.hrd-progress-bar {
    height: 4px;
    background: var(--hrd-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hrd-progress-fill {
    height: 100%;
    background: var(--hrd-accent);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 33.33%;
}

.hrd-progress-fill[data-step="1"] { width: 33.33%; }
.hrd-progress-fill[data-step="2"] { width: 66.66%; }
.hrd-progress-fill[data-step="3"] { width: 100%; }

.hrd-progress-steps {
    display: flex;
    justify-content: space-between;
}

.hrd-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.hrd-progress-step.active,
.hrd-progress-step.completed {
    opacity: 1;
}

.hrd-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--hrd-border);
    color: var(--hrd-text-secondary);
    transition: all 0.3s;
}

.hrd-progress-step.active .hrd-step-number {
    background: var(--hrd-accent);
    border-color: var(--hrd-accent);
    color: #fff;
}

.hrd-progress-step.completed .hrd-step-number {
    background: var(--hrd-success-color);
    border-color: var(--hrd-success-color);
    color: #fff;
}

.hrd-progress-step.completed .hrd-step-number::after {
    content: '✓';
}

.hrd-step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--hrd-text-secondary);
}

.hrd-progress-step.active .hrd-step-label {
    color: var(--hrd-text);
}

/* ─── Step Content ──────────────────────────────────────────── */
.hrd-step {
    animation: hrdFadeIn 0.35s ease;
}

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

.hrd-step-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--hrd-text);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.hrd-step-subtitle {
    font-size: 15px;
    color: var(--hrd-text-secondary);
    margin: 0 0 28px 0;
}

/* ─── Event Type Cards ──────────────────────────────────────── */
.hrd-event-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.hrd-event-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 8px;
    background: var(--hrd-bg-card);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 100px;
}

.hrd-event-card:hover {
    background: var(--hrd-bg-card-hover);
    border-color: var(--hrd-border);
}

.hrd-event-card.selected {
    background: var(--hrd-bg-card-active);
    border-color: var(--hrd-accent);
}

.hrd-event-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hrd-event-icon {
    font-size: 28px;
    margin-bottom: 6px;
    line-height: 1;
}

.hrd-event-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--hrd-text);
    line-height: 1.3;
}

/* ─── Form Fields ───────────────────────────────────────────── */
.hrd-field-group {
    margin-bottom: 20px;
}

.hrd-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hrd-text);
    margin-bottom: 6px;
}

.hrd-optional {
    font-weight: 400;
    color: var(--hrd-text-hint);
}

.hrd-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--hrd-bg-input);
    border: 1.5px solid var(--hrd-border);
    border-radius: 10px;
    color: var(--hrd-text-input);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.hrd-input::placeholder {
    color: var(--hrd-text-hint);
}

.hrd-input:focus {
    background: var(--hrd-bg-input-focus);
    border-color: var(--hrd-border-focus);
    box-shadow: 0 0 0 3px var(--hrd-accent-glow);
}

.hrd-input.hrd-input-icon {
    padding-left: 44px;
}

.hrd-textarea {
    resize: vertical;
    min-height: 80px;
}

select.hrd-input {
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px;
}

select.hrd-input::-ms-expand {
    display: none;
}

/* ─── Dark Theme: Input Fixes (override Kadence) ─────────── */
.hrd-quote-wrapper[data-theme="dark"] .hrd-input,
.hrd-quote-wrapper[data-theme="dark"] input.hrd-input,
.hrd-quote-wrapper[data-theme="dark"] select.hrd-input,
.hrd-quote-wrapper[data-theme="dark"] textarea.hrd-input {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.12) !important;
    -webkit-text-fill-color: #ffffff !important;
}

.hrd-quote-wrapper[data-theme="dark"] .hrd-input:focus,
.hrd-quote-wrapper[data-theme="dark"] input.hrd-input:focus,
.hrd-quote-wrapper[data-theme="dark"] select.hrd-input:focus,
.hrd-quote-wrapper[data-theme="dark"] textarea.hrd-input:focus {
    background: rgba(255,255,255,0.12) !important;
    border-color: #F97316 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.hrd-quote-wrapper[data-theme="dark"] .hrd-input::placeholder {
    color: rgba(255,255,255,0.45) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.45) !important;
}

.hrd-quote-wrapper[data-theme="dark"] select.hrd-input option {
    background: #1a2744 !important;
    color: #ffffff !important;
}

.hrd-quote-wrapper[data-theme="dark"] input[type="date"].hrd-input {
    color-scheme: dark;
}

.hrd-quote-wrapper[data-theme="dark"] input:-webkit-autofill,
.hrd-quote-wrapper[data-theme="dark"] input:-webkit-autofill:hover,
.hrd-quote-wrapper[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255,255,255,0.08) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.hrd-quote-wrapper[data-theme="dark"] select.hrd-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.hrd-hint {
    display: block;
    font-size: 12px;
    color: var(--hrd-text-hint);
    margin-top: 6px;
    font-style: italic;
}

.hrd-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.hrd-col {
    flex: 1;
}

/* ─── Validation ────────────────────────────────────────────── */
.hrd-input.hrd-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.hrd-error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.hrd-input.hrd-error + .hrd-error-msg,
.hrd-event-grid.hrd-error ~ .hrd-error-msg {
    display: block;
}

/* ─── Location Dropdown ─────────────────────────────────────── */
.hrd-location-wrapper {
    position: relative;
}

.hrd-location-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
}

.hrd-destinations-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--hrd-bg-dropdown);
    border: 1.5px solid var(--hrd-border);
    border-radius: 12px;
    box-shadow: var(--hrd-dropdown-shadow);
    z-index: 100;
    padding: 12px 0;
    max-height: 320px;
    overflow-y: auto;
}

.hrd-dropdown-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hrd-text-hint);
    padding: 4px 16px 8px;
    margin: 0;
}

.hrd-destination-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hrd-destination-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--hrd-text);
    transition: background 0.15s;
}

.hrd-destination-list li:hover {
    background: var(--hrd-bg-card-hover);
}

.hrd-city-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hrd-bg-card);
    border-radius: 8px;
    flex-shrink: 0;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.hrd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.hrd-btn-next,
.hrd-btn-submit {
    background: var(--hrd-accent);
    color: var(--hrd-btn-text);
    width: 100%;
}

.hrd-btn-next:hover,
.hrd-btn-submit:hover {
    background: var(--hrd-accent-hover);
    box-shadow: 0 8px 24px var(--hrd-accent-glow);
}

.hrd-btn-back {
    background: var(--hrd-btn-back-bg);
    color: var(--hrd-btn-back-text);
    border: 1.5px solid var(--hrd-btn-back-border);
    padding: 14px 24px;
}

.hrd-btn-back:hover {
    background: var(--hrd-btn-back-hover);
}

.hrd-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.hrd-btn-row .hrd-btn-next,
.hrd-btn-row .hrd-btn-submit {
    flex: 1;
}

.hrd-btn-arrow {
    font-size: 18px;
    transition: transform 0.2s;
}

.hrd-btn-next:hover .hrd-btn-arrow { transform: translateX(3px); }
.hrd-btn-back:hover .hrd-btn-arrow { transform: translateX(-3px); }

/* ─── Loading Spinner ───────────────────────────────────────── */
.hrd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: var(--hrd-btn-text);
    border-radius: 50%;
    animation: hrdSpin 0.6s linear infinite;
}

@keyframes hrdSpin {
    to { transform: rotate(360deg); }
}

/* ─── Trust Badge ───────────────────────────────────────────── */
.hrd-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--hrd-trust-bg);
    border-radius: 10px;
    margin-bottom: 20px;
}

.hrd-trust-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.hrd-trust-text {
    font-size: 12px;
    color: var(--hrd-text-secondary);
    line-height: 1.4;
}

/* ─── reCAPTCHA ─────────────────────────────────────────────── */
.hrd-recaptcha-wrap {
    margin-bottom: 20px;
}

/* ─── Success State ─────────────────────────────────────────── */
.hrd-success {
    text-align: center;
    padding: 20px 0;
    animation: hrdFadeIn 0.5s ease;
}

.hrd-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--hrd-success-bg);
    border: 2px solid var(--hrd-success-border);
    color: var(--hrd-success-color);
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.hrd-success-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--hrd-text);
    margin: 0 0 16px;
}

.hrd-success-message {
    font-size: 15px;
    color: var(--hrd-text-secondary);
    line-height: 1.6;
    margin: 0 0 12px;
}

.hrd-success-note {
    font-size: 14px;
    font-weight: 600;
    color: var(--hrd-accent);
    font-style: italic;
    margin: 0 0 24px;
}

.hrd-success-contact {
    padding-top: 20px;
    border-top: 1px solid var(--hrd-border);
}

.hrd-success-contact p {
    font-size: 13px;
    color: var(--hrd-text-hint);
    margin: 0 0 12px;
}

.hrd-success-phone,
.hrd-success-email {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hrd-accent);
    text-decoration: none;
    border: 1.5px solid var(--hrd-border);
    border-radius: 8px;
    transition: all 0.2s;
}

.hrd-success-phone:hover,
.hrd-success-email:hover {
    border-color: var(--hrd-accent);
    background: var(--hrd-accent-glow);
}

/* ─── Other Event Input ─────────────────────────────────────── */
.hrd-other-event {
    margin-bottom: 20px;
    animation: hrdFadeIn 0.3s ease;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hrd-quote-wrapper {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .hrd-event-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hrd-row {
        flex-direction: column;
        gap: 0;
    }

    .hrd-col {
        margin-bottom: 20px;
    }

    .hrd-step-title {
        font-size: 20px;
    }

    .hrd-step-label {
        display: none;
    }

    .hrd-progress-step {
        gap: 0;
    }

    .hrd-btn-row {
        flex-direction: column-reverse;
    }

    .hrd-btn-back {
        width: 100%;
    }
}
