/* ==========================================================================
   TrustDento - Interactive Components Stylesheet
   Font: Sora
   ========================================================================== */

/* 1. Time Slot Picker Widget */
.booking-widget {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    width: 100%;
}

.date-scroll-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.date-pill {
    flex: 0 0 76px;
    padding: 0.65rem 0.25rem;
    text-align: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: #ffffff;
    transition: var(--transition);
    user-select: none;
}

.date-pill:hover {
    border-color: var(--primary);
    background: var(--bg-card-subtle);
}

.date-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(2, 132, 199, 0.25);
}

.date-pill .day-name {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    font-family: var(--font-heading);
}

.date-pill .day-number {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-heading);
    display: block;
    margin-top: 0.15rem;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.slot-btn {
    padding: 0.6rem 0.4rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    color: var(--text-main);
}

.slot-btn:hover:not(.disabled) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.slot-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.slot-btn.disabled {
    background: var(--bg-card-subtle);
    color: var(--text-light);
    border-color: var(--border-color);
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* 2. Live Search Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
    display: none;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-main);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--primary-light);
}

.autocomplete-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.autocomplete-title {
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

.autocomplete-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 3. SERP Simulator Preview */
.serp-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-family: Arial, sans-serif;
    margin-bottom: 1.5rem;
}

.serp-url-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #202124;
    margin-bottom: 0.25rem;
}

.serp-favicon {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
}

.serp-title {
    font-size: 1.25rem;
    color: #1a0dab;
    line-height: 1.3;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.serp-title:hover {
    text-decoration: underline;
}

.serp-snippet {
    font-size: 0.875rem;
    color: #4d5156;
    line-height: 1.4;
}

.char-counter {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.char-counter.good { color: var(--success); }
.char-counter.warning { color: var(--warning); }
.char-counter.danger { color: var(--danger); }

/* 4. Multi-Step Onboarding Progress Indicator */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin-bottom: 2.5rem;
    position: relative;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.wizard-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    min-width: 60px;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    margin: 0 auto 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.wizard-step.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.wizard-step.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: #ffffff;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.wizard-step.active .step-label {
    color: var(--primary);
}

/* 5. Rating Stars */
.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: #f59e0b;
    font-size: 0.95rem;
}

.rating-badge {
    background: #047857;
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-heading);
}

/* Mobile Component Tweaks */
@media (max-width: 640px) {
    .booking-widget {
        padding: 1.25rem;
    }

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

    .wizard-progress {
        margin-bottom: 1.5rem;
    }

    .step-label {
        display: none;
    }
}
