/* Arreglat Bookings - Frontend Styles */
:root {
    --arreglat-primary: #2563eb;
    --arreglat-primary-hover: #1d4ed8;
    --arreglat-primary-light: #eff6ff;
    --arreglat-success: #16a34a;
    --arreglat-success-light: #f0fdf4;
    --arreglat-danger: #dc2626;
    --arreglat-text: #1e293b;
    --arreglat-text-light: #64748b;
    --arreglat-border: #e2e8f0;
    --arreglat-bg: #ffffff;
    --arreglat-bg-alt: #f8fafc;
    --arreglat-radius: 12px;
    --arreglat-radius-sm: 8px;
    --arreglat-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --arreglat-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Container */
.arreglat-booking {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
    font-family: var(--arreglat-font);
    color: var(--arreglat-text);
    line-height: 1.5;
    box-sizing: border-box;
}
.arreglat-booking *, .arreglat-booking *::before, .arreglat-booking *::after {
    box-sizing: border-box;
}

/* Progress bar */
.arreglat-progress {
    margin-bottom: 32px;
}
.arreglat-progress__bar {
    height: 4px;
    background: var(--arreglat-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}
.arreglat-progress__fill {
    height: 100%;
    background: var(--arreglat-primary);
    transition: width 0.4s ease;
    border-radius: 2px;
}
.arreglat-progress__steps {
    display: flex;
    justify-content: space-between;
}
.arreglat-progress__step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--arreglat-bg-alt);
    border: 2px solid var(--arreglat-border);
    color: var(--arreglat-text-light);
    transition: all 0.3s ease;
}
.arreglat-progress__step.active {
    background: var(--arreglat-primary);
    border-color: var(--arreglat-primary);
    color: #fff;
}
.arreglat-progress__step.completed {
    background: var(--arreglat-success);
    border-color: var(--arreglat-success);
    color: #fff;
}

/* Steps */
.arreglat-step {
    display: none;
    padding: 8px 0;
}
.arreglat-step.active {
    display: block;
    animation: arreglat-fadeIn 0.3s ease;
}
@keyframes arreglat-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Step title */
.arreglat-step__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--arreglat-text);
}

/* Service cards */
.arreglat-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.arreglat-service-card {
    background: var(--arreglat-bg);
    border: 2px solid var(--arreglat-border);
    border-radius: var(--arreglat-radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.arreglat-service-card:hover {
    border-color: var(--arreglat-primary);
    box-shadow: var(--arreglat-shadow);
    transform: translateY(-2px);
}
.arreglat-service-card.selected {
    border-color: var(--arreglat-primary);
    background: var(--arreglat-primary-light);
}
.arreglat-service-card__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arreglat-service-card__icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--arreglat-primary);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.arreglat-service-card__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

/* Calendar */
.arreglat-calendar {
    max-width: 400px;
    margin: 0 auto;
}
.arreglat-calendar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.arreglat-calendar__title {
    font-size: 18px;
    font-weight: 700;
}
.arreglat-calendar__nav {
    background: none;
    border: 2px solid var(--arreglat-border);
    border-radius: var(--arreglat-radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--arreglat-text);
    transition: all 0.2s;
}
.arreglat-calendar__nav:hover {
    border-color: var(--arreglat-primary);
    color: var(--arreglat-primary);
}
.arreglat-calendar__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.arreglat-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.arreglat-calendar__day-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--arreglat-text-light);
    padding: 8px 0;
    text-transform: uppercase;
}
.arreglat-calendar__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--arreglat-radius-sm);
    font-size: 14px;
    cursor: default;
    color: var(--arreglat-text-light);
    transition: all 0.15s;
}
.arreglat-calendar__day--empty {
    visibility: hidden;
}
.arreglat-calendar__day--available {
    cursor: pointer;
    color: var(--arreglat-text);
    font-weight: 600;
    background: var(--arreglat-bg-alt);
}
.arreglat-calendar__day--available:hover {
    background: var(--arreglat-primary);
    color: #fff;
}
.arreglat-calendar__day--unavailable {
    opacity: 0.35;
    text-decoration: line-through;
}
.arreglat-calendar__day--selected {
    background: var(--arreglat-primary) !important;
    color: #fff !important;
}
.arreglat-calendar__day--today {
    border: 2px solid var(--arreglat-primary);
}

/* Time slots */
.arreglat-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    max-width: 500px;
}
.arreglat-slot-btn {
    padding: 14px 8px;
    border: 2px solid var(--arreglat-border);
    border-radius: var(--arreglat-radius-sm);
    background: var(--arreglat-bg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--arreglat-font);
}
.arreglat-slot-btn:hover {
    border-color: var(--arreglat-primary);
    color: var(--arreglat-primary);
}
.arreglat-slot-btn.selected {
    background: var(--arreglat-primary);
    border-color: var(--arreglat-primary);
    color: #fff;
}
.arreglat-no-slots {
    text-align: center;
    padding: 32px;
    color: var(--arreglat-text-light);
    font-size: 15px;
}

/* Contact form */
.arreglat-form {
    max-width: 480px;
}
.arreglat-form__group {
    margin-bottom: 20px;
}
.arreglat-form__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--arreglat-text);
}
.arreglat-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--arreglat-border);
    border-radius: var(--arreglat-radius-sm);
    font-size: 16px;
    font-family: var(--arreglat-font);
    color: var(--arreglat-text);
    transition: border-color 0.2s;
    background: var(--arreglat-bg);
}
.arreglat-form__input:focus {
    outline: none;
    border-color: var(--arreglat-primary);
}
.arreglat-form__input--error {
    border-color: var(--arreglat-danger);
}
.arreglat-form__error {
    color: var(--arreglat-danger);
    font-size: 13px;
    margin-top: 4px;
    display: none;
}
.arreglat-form__error.visible {
    display: block;
}
textarea.arreglat-form__input {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.arreglat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--arreglat-radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--arreglat-font);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.arreglat-btn--primary {
    background: var(--arreglat-primary);
    color: #fff;
}
.arreglat-btn--primary:hover {
    background: var(--arreglat-primary-hover);
}
.arreglat-btn--success {
    background: var(--arreglat-success);
    color: #fff;
}
.arreglat-btn--back {
    background: transparent;
    color: var(--arreglat-text-light);
    padding-left: 0;
}
.arreglat-btn--back:hover {
    color: var(--arreglat-text);
}
.arreglat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navigation */
.arreglat-nav {
    margin-top: 8px;
}

/* Summary / Confirmation */
.arreglat-summary {
    background: var(--arreglat-bg-alt);
    border-radius: var(--arreglat-radius);
    padding: 24px;
    margin-bottom: 24px;
}
.arreglat-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--arreglat-border);
    font-size: 15px;
}
.arreglat-summary__row:last-child {
    border-bottom: none;
}
.arreglat-summary__label {
    color: var(--arreglat-text-light);
}
.arreglat-summary__value {
    font-weight: 600;
    text-align: right;
}

/* Thank you */
.arreglat-thankyou {
    text-align: center;
    padding: 40px 0;
}
.arreglat-thankyou__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--arreglat-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arreglat-thankyou__icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--arreglat-success);
    stroke-width: 2;
    fill: none;
}
.arreglat-thankyou__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.arreglat-thankyou__msg {
    color: var(--arreglat-text-light);
    font-size: 16px;
    margin: 0 0 24px 0;
}

/* Loading */
.arreglat-loading {
    text-align: center;
    padding: 40px;
    color: var(--arreglat-text-light);
}
.arreglat-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--arreglat-border);
    border-top-color: var(--arreglat-primary);
    border-radius: 50%;
    animation: arreglat-spin 0.7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes arreglat-spin {
    to { transform: rotate(360deg); }
}

/* Error */
.arreglat-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--arreglat-danger);
    padding: 12px 16px;
    border-radius: var(--arreglat-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 480px) {
    .arreglat-booking {
        padding: 16px;
    }
    .arreglat-services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .arreglat-service-card {
        padding: 14px 10px;
    }
    .arreglat-service-card__icon {
        width: 32px;
        height: 32px;
    }
    .arreglat-service-card__name {
        font-size: 13px;
    }
    .arreglat-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .arreglat-slot-btn {
        padding: 10px 4px;
        font-size: 14px;
    }
    .arreglat-summary__row {
        flex-direction: column;
        gap: 2px;
    }
    .arreglat-summary__value {
        text-align: left;
    }
    .arreglat-step__title {
        font-size: 18px;
    }
}
