/* ─── Booking Page (Customer-Facing) ─── */

.booking-page-wrapper {
    min-height: 60vh;
    padding: 30px 0 60px;
    background: #f5f7fa;
}

.booking-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Progress Bar ─── */

.booking-progress {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.booking-progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    color: #999;
    position: relative;
}

.booking-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    width: 16px;
    height: 1px;
    background: #ddd;
}

.booking-progress-step .step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.booking-progress-step.active .step-number {
    background: #2eab8b;
    color: #fff;
}

.booking-progress-step.active {
    color: #2eab8b;
    font-weight: 600;
}

.booking-progress-step.completed .step-number {
    background: #c8e6c9;
    color: #2e7d32;
}

.booking-progress-step.completed {
    color: #666;
}

.step-label {
    display: none;
}

@media (min-width: 600px) {
    .step-label {
        display: inline;
    }
}

/* ─── Steps ─── */

.booking-step {
    display: none;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

.booking-step h2 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #333;
}

/* ─── Service Cards ─── */

.service-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card {
    padding: 16px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    border-color: #2eab8b;
    box-shadow: 0 2px 8px rgba(46, 171, 139, 0.12);
}

.service-card.selected {
    border-color: #2eab8b;
    background: #f0faf6;
}

.service-card-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.service-card-meta {
    margin-top: 4px;
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 16px;
}

.service-card-duration::before {
    content: '⏱ ';
}

.service-card-price {
    font-weight: 600;
    color: #2eab8b;
}

.service-card-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #888;
}

/* ─── Employee Cards ─── */

.employee-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.employee-card {
    padding: 16px 24px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 150px;
    text-align: center;
}

.employee-card:hover {
    border-color: #2eab8b;
}

.employee-card.selected {
    border-color: #2eab8b;
    background: #f0faf6;
}

.employee-card-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.employee-card-title {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ─── Week View ─── */

.week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.week-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    color: #333;
}

.week-nav {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.week-nav:hover {
    background: #e0e0e0;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.week-col {
    border-right: 1px solid #e8e8e8;
    min-height: 200px;
}

.week-col:last-child {
    border-right: none;
}

.week-col-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    padding: 10px 4px;
}

.week-day-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.week-day-date {
    font-size: 12px;
    color: #888;
}

.week-col-past .week-col-header {
    background: #f0f0f0;
    color: #bbb;
}

.week-col-past .week-day-name,
.week-col-past .week-day-date {
    color: #bbb;
}

.week-col-past .week-col-slots {
    background: #fafafa;
}

.week-col-today .week-col-header {
    background: #e8f5e9;
    border-bottom-color: #2eab8b;
}

.week-col-today .week-day-name {
    color: #2eab8b;
}

.week-col-slots {
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
}

.week-slot {
    display: block;
    width: 100%;
    padding: 8px 4px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    color: #333;
    transition: all 0.15s;
}

.week-slot:hover {
    background: #e8f5e9;
    border-color: #2eab8b;
}

.week-slot.selected {
    background: #2eab8b;
    border-color: #2eab8b;
    color: #fff;
}

.booking-hint {
    color: #999;
    font-size: 14px;
    padding: 20px 0;
}

/* ─── Kotikäynti Date Picker ─── */

.koti-hint {
    color: #555;
    font-size: 14px;
    margin-bottom: 15px;
}

.koti-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.koti-month-title {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.koti-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.koti-cal-header {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    padding: 6px 0;
}

.koti-cal-empty {
    min-height: 44px;
}

.koti-cal-day {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    transition: border-color 0.2s;
    min-height: 40px;
}

.koti-cal-selectable {
    cursor: pointer;
}

.koti-cal-selectable:hover {
    border-color: #2eab8b;
}

.koti-cal-checked {
    border-color: #2eab8b;
    background: #f0faf6;
}

.koti-cal-past {
    opacity: 0.35;
    cursor: default;
}

.koti-date-cb {
    width: auto !important;
    flex-shrink: 0;
}

.koti-cal-label {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.koti-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

#koti-count {
    font-size: 13px;
    color: #888;
}

@media (max-width: 500px) {
    .koti-cal-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .koti-cal-header {
        display: none;
    }

    .koti-cal-empty {
        display: none;
    }

    .koti-cal-day {
        padding: 10px 8px;
    }

    .koti-cal-label {
        font-size: 13px;
    }
}

/* ─── Week View Mobile ─── */

@media (max-width: 600px) {
    .week-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .week-col {
        min-height: 120px;
    }

    .week-slot {
        font-size: 12px;
        padding: 6px 2px;
    }
}

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

/* ─── Booking Form ─── */

.booking-summary {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 3px solid #2eab8b;
}

.summary-row {
    padding: 4px 0;
    font-size: 14px;
    color: #555;
}

.summary-row span {
    color: #999;
    margin-right: 4px;
}

.booking-customer-form {
    position: relative;
}

.bform-group {
    margin-bottom: 16px;
}

.bform-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.bform-group input,
.bform-group textarea,
.bform-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    font-family: inherit;
}

.bform-group input:focus,
.bform-group textarea:focus {
    border-color: #2eab8b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 171, 139, 0.12);
}

.bform-radio-group {
    display: flex;
    gap: 20px;
}

.bform-radio-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.bform-radio-group input[type="radio"] {
    width: auto;
}

.bform-terms {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.bform-terms h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.bform-terms-content {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    max-height: 150px;
    overflow-y: auto;
}

.bform-consent {
    margin-top: 20px;
    margin-bottom: 8px;
}

.bform-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.4;
}

.bform-consent-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.bform-consent-label a {
    color: #2eab8b;
    text-decoration: underline;
}

.bform-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.booking-step-nav {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.booking-btn-back {
    padding: 12px 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
    color: #666;
}

.booking-btn-back:hover {
    background: #f5f5f5;
}

.booking-btn-submit {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    background: #2eab8b;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.booking-btn-submit:hover {
    background: #259b7c;
}

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

/* ─── Confirmation ─── */

.confirmation-card {
    text-align: center;
    padding: 20px;
}

.confirmation-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
}

.confirmation-icon.confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.confirmation-icon.pending {
    background: #fff3e0;
    color: #e65100;
}

.confirmation-status {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.confirmation-code {
    background: #f5f5f5;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 15px;
}

.confirmation-code strong {
    font-size: 20px;
    letter-spacing: 2px;
    color: #2eab8b;
    margin-left: 8px;
}

.confirmation-details {
    text-align: left;
    max-width: 350px;
    margin: 0 auto 20px;
    font-size: 14px;
    color: #555;
}

.confirmation-details div {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.confirmation-details span {
    color: #999;
    margin-right: 4px;
}

.confirmation-hint {
    font-size: 13px;
    color: #999;
}

/* ─── Payment ─── */

.confirmation-payment {
    margin: 20px 0;
}

.confirmation-payment .booking-btn-submit {
    font-size: 16px;
    padding: 14px 36px;
}

.payment-providers h3 {
    font-size: 16px;
    margin: 20px 0 12px;
    color: #333;
}

.provider-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    min-width: 80px;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.provider-btn:hover {
    border-color: #2eab8b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.provider-btn img {
    max-height: 28px;
    max-width: 100px;
}

/* ─── Messages ─── */

.booking-loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

.booking-error {
    color: #e74c3c;
    padding: 15px;
    background: #fdecea;
    border-radius: 6px;
    font-size: 14px;
}

.booking-empty-msg {
    color: #999;
    padding: 20px;
    text-align: center;
}

/* ─── Mobile ─── */

@media (max-width: 600px) {
    .booking-step {
        padding: 20px 15px;
    }

    .booking-datetime-container {
        flex-direction: column;
    }

    .employee-cards {
        flex-direction: column;
    }

    .bform-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .booking-btn-back,
    .booking-btn-submit {
        width: 100%;
        text-align: center;
    }

    .timeslot-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}
