/* =============================================
   Incluaweb Booking — Public CSS
   ============================================= */

:root {
    --iwb-primary: #3B82F6;
    --iwb-primary-dark: #2563EB;
    --iwb-success: #10B981;
    --iwb-warning: #F59E0B;
    --iwb-danger: #EF4444;
    --iwb-muted: #9CA3AF;
    --iwb-bg: #F9FAFB;
    --iwb-card-bg: #FFFFFF;
    --iwb-border: #E5E7EB;
    --iwb-text: #111827;
    --iwb-text-light: #6B7280;
    --iwb-radius: 12px;
    --iwb-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --iwb-shadow-hover: 0 4px 12px rgba(59,130,246,.2);
}

/* --- Wrapper --- */
.iwb-booking-wizard {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--iwb-text);
}

.iwb-booking-wizard h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--iwb-text);
}

.iwb-booking-wizard h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
}

/* --- Progress bar --- */
.iwb-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.iwb-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.iwb-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--iwb-border);
    color: var(--iwb-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all .25s;
}

.iwb-step-label {
    font-size: 0.72rem;
    color: var(--iwb-muted);
    white-space: nowrap;
    transition: color .25s;
}

.iwb-progress-step.active .iwb-step-num {
    background: var(--iwb-primary);
    color: #fff;
}

.iwb-progress-step.active .iwb-step-label {
    color: var(--iwb-primary);
    font-weight: 600;
}

.iwb-progress-step.done .iwb-step-num {
    background: var(--iwb-success);
    color: #fff;
}

.iwb-progress-connector {
    flex: 1;
    height: 2px;
    background: var(--iwb-border);
    min-width: 20px;
    max-width: 60px;
    margin-bottom: 20px;
}

/* --- Service cards --- */
.iwb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.iwb-service-card {
    background: var(--iwb-card-bg);
    border: 2px solid var(--iwb-border);
    border-radius: var(--iwb-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}

.iwb-service-card:hover {
    border-color: var(--iwb-primary);
    box-shadow: var(--iwb-shadow-hover);
    transform: translateY(-2px);
}

.iwb-service-card.selected {
    border-color: var(--iwb-primary);
    background: #EFF6FF;
}

.iwb-service-color {
    height: 6px;
}

.iwb-service-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iwb-service-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.iwb-service-info p {
    font-size: 0.8rem;
    color: var(--iwb-text-light);
    margin: 0;
    flex: 1;
}

.iwb-service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--iwb-text-light);
    margin-top: 4px;
}

.iwb-service-price {
    font-weight: 700;
    color: var(--iwb-primary);
    font-size: 0.95rem;
}

/* --- Professional cards --- */
.iwb-professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.iwb-pro-card {
    background: var(--iwb-card-bg);
    border: 2px solid var(--iwb-border);
    border-radius: var(--iwb-radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}

.iwb-pro-card:hover, .iwb-pro-card.selected {
    border-color: var(--iwb-primary);
    box-shadow: var(--iwb-shadow-hover);
}

.iwb-pro-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--iwb-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 auto 10px;
}

.iwb-pro-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.iwb-pro-bio {
    font-size: 0.78rem;
    color: var(--iwb-text-light);
    margin-top: 4px;
}

/* --- Calendar --- */
.iwb-datetime-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.iwb-calendar-picker {
    background: var(--iwb-card-bg);
    border: 1px solid var(--iwb-border);
    border-radius: var(--iwb-radius);
    padding: 16px;
}

.iwb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.iwb-cal-header button {
    background: none;
    border: 1px solid var(--iwb-border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.iwb-cal-header button:hover {
    background: var(--iwb-primary);
    color: #fff;
    border-color: var(--iwb-primary);
}

#iwb-cal-month-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.iwb-cal-daynames {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--iwb-text-light);
    margin-bottom: 6px;
}

#iwb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.iwb-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    border-radius: 6px;
    cursor: default;
}

.iwb-cal-day.available {
    cursor: pointer;
    font-weight: 600;
    background: #EFF6FF;
    color: var(--iwb-primary);
    transition: all .15s;
}

.iwb-cal-day.available:hover {
    background: var(--iwb-primary);
    color: #fff;
}

.iwb-cal-day.selected {
    background: var(--iwb-primary) !important;
    color: #fff !important;
}

.iwb-cal-day.past, .iwb-cal-day.unavailable {
    color: var(--iwb-muted);
    font-size: 0.75rem;
}

/* --- Slots --- */
.iwb-time-picker {
    background: var(--iwb-card-bg);
    border: 1px solid var(--iwb-border);
    border-radius: var(--iwb-radius);
    padding: 16px;
    max-height: 340px;
    overflow-y: auto;
}

#iwb-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.iwb-slot-btn {
    padding: 10px 4px;
    border: 2px solid var(--iwb-border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    color: var(--iwb-text);
}

.iwb-slot-btn:hover {
    border-color: var(--iwb-primary);
    color: var(--iwb-primary);
}

.iwb-slot-btn.selected {
    background: var(--iwb-primary);
    border-color: var(--iwb-primary);
    color: #fff;
}

/* --- Client form --- */
.iwb-client-form {
    max-width: 500px;
    margin-bottom: 20px;
}

.iwb-form-group {
    margin-bottom: 14px;
}

.iwb-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--iwb-text);
}

.iwb-form-group input,
.iwb-form-group textarea,
.iwb-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--iwb-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--iwb-text);
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
}

.iwb-form-group input:focus,
.iwb-form-group textarea:focus,
.iwb-form-group select:focus {
    outline: none;
    border-color: var(--iwb-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.iwb-coupon-row {
    display: flex;
    gap: 8px;
}

.iwb-coupon-row input {
    flex: 1;
    font-family: monospace;
    letter-spacing: 2px;
}

.iwb-coupon-ok { color: var(--iwb-success); font-size: 0.85rem; font-weight: 600; }
.iwb-coupon-err { color: var(--iwb-danger); font-size: 0.85rem; }

/* --- Summary --- */
.iwb-summary-card {
    background: var(--iwb-card-bg);
    border: 1px solid var(--iwb-border);
    border-radius: var(--iwb-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.iwb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--iwb-border);
    font-size: 0.9rem;
}

.iwb-summary-row:last-child { border-bottom: none; }
.iwb-discount-row strong { color: var(--iwb-success); }

.iwb-total-row {
    font-size: 1.05rem;
    font-weight: 700;
}

.iwb-total-row strong { color: var(--iwb-primary); font-size: 1.15rem; }

/* --- Buttons --- */
.iwb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1.5px solid var(--iwb-border);
    border-radius: 8px;
    background: #fff;
    color: var(--iwb-text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    line-height: 1;
}

.iwb-btn:hover {
    background: var(--iwb-bg);
    border-color: #D1D5DB;
}

.iwb-btn-primary {
    background: var(--iwb-primary);
    border-color: var(--iwb-primary);
    color: #fff;
}

.iwb-btn-primary:hover {
    background: var(--iwb-primary-dark);
    border-color: var(--iwb-primary-dark);
    color: #fff;
}

.iwb-btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 10px;
    margin-top: 4px;
}

.iwb-btn-back {
    margin-right: 10px;
    color: var(--iwb-text-light);
}

.iwb-btn-whatsapp {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

.iwb-btn-whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
    color: #fff;
}

/* --- Success --- */
.iwb-success-step {
    text-align: center;
    padding: 40px 20px;
}

.iwb-success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: iwb-pop .4s ease;
}

@keyframes iwb-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.iwb-success-whatsapp { margin-top: 20px; }

/* --- Loading --- */
.iwb-loading {
    text-align: center;
    color: var(--iwb-text-light);
    padding: 20px;
    font-size: 0.9rem;
}

.iwb-hint {
    color: var(--iwb-text-light);
    text-align: center;
    font-size: 0.85rem;
    padding: 20px 0;
}

/* --- Loyalty widget --- */
.iwb-loyalty-widget {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: var(--iwb-radius);
    padding: 20px;
    margin-top: 16px;
}

.iwb-loyalty-points {
    font-size: 2rem;
    font-weight: 800;
    color: #92400E;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .iwb-services-grid { grid-template-columns: 1fr; }
    .iwb-professionals-grid { grid-template-columns: repeat(2, 1fr); }
    #iwb-slots-grid { grid-template-columns: repeat(3, 1fr); }
    .iwb-progress { gap: 0; }
    .iwb-step-label { font-size: 0.65rem; }
    .iwb-step-num { width: 28px; height: 28px; font-size: 0.75rem; }
    .iwb-progress-connector { min-width: 10px; max-width: 24px; }
}
