/**
 * Customer Onboarding Wizard Styles
 *
 * Multi-step form with interactive SVG diagrams.
 * Brand colors: #00073F (navy), #E85D26 (orange), #F59E0B (amber)
 */

/* === Fixed header clearance ===
   Astra theme already offsets .site-content ~80px for the fixed header.
   We only add a small top padding to guarantee clearance. */
.site-content {
    padding-top: 16px !important;
}

@media (max-width: 768px) {
    .site-content {
        padding-top: 8px !important;
    }
}

/* Hide WordPress page title — wizard has its own step headings.
   Uses sr-only pattern so screen readers still see it. */
.entry-header.ast-no-thumbnail {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* === Wizard Container === */
.eko-wizard {
    max-width: 800px;
    margin: 0 auto 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

/* === Progress Bar === */
.eko-progress {
    margin-bottom: 16px;
}

.eko-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.eko-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00073F, #E85D26);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

.eko-steps-indicator {
    display: flex;
    justify-content: space-between;
    max-width: 300px;
    margin: 0 auto;
}

.eko-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.eko-step-dot.active {
    background: #00073F;
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 7, 63, 0.15);
}

.eko-step-dot.done {
    background: #10B981;
    color: white;
}

/* === Steps === */
.eko-step {
    display: none;
    animation: ekoFadeIn 0.3s ease;
}

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

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

.eko-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #00073F;
    margin: 0 0 4px;
}

.eko-step-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 14px;
}

/* === Service Selection Grid (Step 1) === */
.eko-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .eko-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.eko-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
}

.eko-service-card:hover {
    border-color: #00073F;
    box-shadow: 0 4px 12px rgba(0, 7, 63, 0.1);
}

.eko-service-card.selected {
    border-color: #E85D26;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    box-shadow: 0 4px 12px rgba(232, 93, 38, 0.15);
}

.eko-service-card input[type="checkbox"] {
    display: none;
}

.eko-service-icon {
    margin-bottom: 4px;
}

.eko-service-icon svg {
    width: 36px;
    height: 36px;
}

.eko-service-name {
    font-weight: 600;
    font-size: 14px;
    color: #00073F;
    margin-bottom: 4px;
}

.eko-service-desc {
    font-size: 12px;
    color: #94a3b8;
    display: none;
}

/* === Form Grid === */
.eko-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.eko-field {
    display: flex;
    flex-direction: column;
}

.eko-field-full {
    grid-column: 1 / -1;
}

.eko-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.eko-field label .req {
    color: #E85D26;
}

/* === Help Info Tooltips === */
.eko-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    margin-left: 4px;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.eko-help:hover {
    background: #00073F;
    color: white;
}

.eko-help .eko-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 220px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.eko-help .eko-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}

.eko-help:hover .eko-tooltip {
    display: block;
}

@media (max-width: 640px) {
    .eko-help .eko-tooltip {
        left: auto;
        right: -8px;
        transform: none;
        width: 200px;
    }
    .eko-help .eko-tooltip::after {
        left: auto;
        right: 12px;
        transform: none;
    }
}

/* === Section Divider within form === */
.eko-section-label {
    grid-column: 1 / -1;
    font-size: 13px;
    font-weight: 700;
    color: #00073F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-top: 8px;
}

.eko-field input,
.eko-field select {
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.eko-field input:focus,
.eko-field select:focus {
    outline: none;
    border-color: #00073F;
    box-shadow: 0 0 0 3px rgba(0, 7, 63, 0.1);
}

.eko-field-error input,
.eko-field-error select {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.eko-field-error label {
    color: #EF4444;
}

.eko-services-grid.eko-field-error {
    outline: 2px solid #EF4444;
    outline-offset: 8px;
    border-radius: 12px;
}

/* === Step 3 Layout: Fields + House SVG === */
.eko-step3-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 768px) {
    .eko-step3-layout {
        grid-template-columns: 1fr;
    }
    .eko-house-svg-container {
        order: -1;
    }
}

.eko-house-svg-container {
    position: sticky;
    top: 20px;
}

.eko-house-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.eko-svg-clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.eko-svg-clickable:hover {
    opacity: 0.7;
}

.eko-svg-hint {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* === Step Navigation === */
.eko-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.eko-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.eko-btn-next,
.eko-btn-submit {
    background: #00073F;
    color: white;
}

.eko-btn-next:hover,
.eko-btn-submit:hover {
    background: #000B5E;
    box-shadow: 0 4px 12px rgba(0, 7, 63, 0.25);
}

.eko-btn-back {
    background: #f1f5f9;
    color: #475569;
}

.eko-btn-back:hover {
    background: #e2e8f0;
}

.eko-btn-submit {
    background: linear-gradient(135deg, #E85D26, #D94B17);
    padding: 14px 36px;
    font-size: 16px;
}

.eko-btn-submit:hover {
    background: linear-gradient(135deg, #D94B17, #C43E10);
    box-shadow: 0 4px 16px rgba(232, 93, 38, 0.3);
}

.eko-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.eko-btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* === Deep Dive Sections (Step 4) === */
.eko-deepdive {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.eko-deepdive-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s;
}

.eko-deepdive-header:hover {
    background: #f1f5f9;
}

.eko-deepdive-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #00073F;
    flex: 1;
}

.eko-deepdive-icon {
    font-size: 20px;
}

.eko-deepdive-toggle {
    font-size: 12px;
    color: #94a3b8;
}

.eko-deepdive-body {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.eko-deepdive-svg {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.eko-envelope-svg {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.eko-compass-svg {
    max-width: 220px;
    width: 100%;
}

.eko-compass-sector {
    cursor: pointer;
    transition: opacity 0.2s;
}

.eko-compass-sector:hover {
    opacity: 0.4 !important;
}

/* === Slider === */
.eko-slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eko-slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
    border-radius: 4px;
    outline: none;
}

.eko-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00073F;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.eko-slider-val {
    font-weight: 700;
    font-size: 16px;
    color: #00073F;
    min-width: 40px;
}

/* === Consent === */
.eko-consent-section {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.eko-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.eko-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #00073F;
    flex-shrink: 0;
}

.eko-checkbox-label a {
    color: #E85D26;
    text-decoration: underline;
}

.eko-checkbox-label.eko-field-error {
    outline: 2px solid #EF4444;
    outline-offset: 4px;
    border-radius: 8px;
}

/* === Messages === */
.eko-msg {
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
}

.eko-msg-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.eko-msg-success {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border: 1px solid #BBF7D0;
    text-align: center;
    padding: 40px 20px;
}

.eko-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #10B981;
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.eko-msg-success h3 {
    color: #065F46;
    font-size: 22px;
    margin: 0 0 12px;
}

.eko-msg-success p {
    color: #047857;
    font-size: 15px;
    margin: 0 0 8px;
}

.eko-msg-success ul {
    text-align: left;
    max-width: 400px;
    margin: 16px auto 0;
    padding-left: 20px;
}

.eko-msg-success li {
    color: #047857;
    font-size: 14px;
    margin-bottom: 6px;
}
