/* TutorLessons Booking v1.0 */
.tl-booking-wrap {
    --tl-blue: #1769e0;
    --tl-blue-dark: #0e4fae;
    --tl-text: #1f2937;
    --tl-muted: #667085;
    --tl-border: #dfe5ec;
    --tl-bg: #f7f9fc;
    max-width: 900px;
    margin: 2rem auto;
    color: var(--tl-text);
    font-family: inherit;
}

.tl-booking-header {
    margin-bottom: 1.5rem;
}

.tl-booking-header h2 {
    margin: .2rem 0 .5rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.tl-booking-header p {
    margin: 0;
    color: var(--tl-muted);
}

.tl-eyebrow {
    display: inline-block;
    color: var(--tl-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
}

.tl-booking-form {
    background: #fff;
    border: 1px solid var(--tl-border);
    border-radius: 18px;
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: 0 12px 35px rgba(23, 45, 77, .08);
}

.tl-grid {
    display: grid;
    gap: 1rem;
}

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

.tl-field label {
    display: block;
    font-weight: 650;
    margin-bottom: .45rem;
}

.tl-field label span {
    font-weight: 400;
    color: var(--tl-muted);
}

.tl-field input,
.tl-field select,
.tl-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--tl-border);
    border-radius: 10px;
    padding: .8rem .9rem;
    background: #fff;
    color: var(--tl-text);
    font: inherit;
}

.tl-field input:focus,
.tl-field select:focus,
.tl-field textarea:focus {
    outline: none;
    border-color: var(--tl-blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .12);
}

.tl-slot-panel {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--tl-bg);
    border-radius: 14px;
}

.tl-slot-title {
    font-weight: 700;
    margin-bottom: .75rem;
}

.tl-slots {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.tl-slot {
    appearance: none;
    border: 1px solid var(--tl-border);
    background: #fff;
    color: var(--tl-text);
    padding: .65rem .9rem;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.tl-slot:hover,
.tl-slot.is-selected {
    border-color: var(--tl-blue);
    background: var(--tl-blue);
    color: #fff;
}

.tl-muted {
    color: var(--tl-muted);
    margin: 0;
}

.tl-details {
    display: none;
}

.tl-details.is-visible {
    display: block;
}

.tl-details > .tl-field {
    margin-top: 1rem;
}

.tl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: .85rem 1.25rem;
    background: var(--tl-blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
}

.tl-button:hover {
    background: var(--tl-blue-dark);
}

.tl-button:disabled {
    opacity: .65;
    cursor: wait;
}

.tl-message {
    margin-top: 1rem;
}

.tl-message.is-error {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 10px;
    padding: .8rem 1rem;
}

.tl-success {
    text-align: center;
    padding: 2rem 1rem;
}

.tl-success-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ecfdf3;
    color: #027a48;
    font-size: 1.8rem;
    font-weight: 800;
}

.tl-alert {
    padding: 1rem;
    border-radius: 10px;
}

.tl-alert-warning {
    background: #fffaeb;
    border: 1px solid #fedf89;
}

@media (max-width: 700px) {
    .tl-grid-2 {
        grid-template-columns: 1fr;
    }

    .tl-booking-wrap {
        margin: 1rem auto;
    }

    .tl-booking-form {
        border-radius: 14px;
    }

    .tl-slot {
        flex: 1 1 calc(33.333% - .6rem);
        min-width: 82px;
    }
}

/* v1.0.3 - server-rendered booking flow */
.tl-check-row {
    margin-top: 1rem;
}

.tl-button-secondary {
    background: #fff;
    color: var(--tl-blue);
    border: 1px solid var(--tl-blue);
}

.tl-button-secondary:hover {
    background: var(--tl-bg);
    color: var(--tl-blue-dark);
}

.tl-slot-choice {
    position: relative;
    cursor: pointer;
}

.tl-slot-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tl-slot-choice span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    border: 1px solid var(--tl-border);
    background: #fff;
    color: var(--tl-text);
    padding: .65rem .9rem;
    border-radius: 999px;
    font-weight: 600;
}

.tl-slot-choice:hover span,
.tl-slot-choice input:focus + span,
.tl-slot-choice input:checked + span {
    border-color: var(--tl-blue);
    background: var(--tl-blue);
    color: #fff;
}

.tl-slot-choice input:focus + span {
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .12);
}


/* v1.0.5 — available-date chooser */
.tl-service-field {
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

.tl-date-panel {
    margin: 1.25rem 0 1.5rem;
    padding: 1.1rem;
    background: var(--tl-bg);
    border-radius: 14px;
}

.tl-section-heading h3,
.tl-details-title {
    margin: 0 0 .25rem;
    font-size: 1.15rem;
}

.tl-section-heading p {
    margin: 0 0 1rem;
    color: var(--tl-muted);
}

.tl-date-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.tl-date-card {
    appearance: none;
    width: 100%;
    min-height: 104px;
    border: 1px solid var(--tl-border);
    background: #fff;
    border-radius: 12px;
    padding: .8rem .7rem;
    color: var(--tl-text);
    text-align: center;
    cursor: pointer;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tl-date-card:hover {
    border-color: var(--tl-blue);
    box-shadow: 0 5px 16px rgba(23, 105, 224, .12);
    transform: translateY(-1px);
}

.tl-date-card.is-selected {
    border-color: var(--tl-blue);
    background: var(--tl-blue);
    color: #fff;
    box-shadow: 0 6px 18px rgba(23, 105, 224, .18);
}

.tl-date-day,
.tl-date-number,
.tl-date-slots {
    display: block;
}

.tl-date-day {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .72;
}

.tl-date-number {
    margin-top: .15rem;
    font-size: 1.08rem;
    font-weight: 800;
}

.tl-date-slots {
    margin-top: .4rem;
    font-size: .76rem;
    opacity: .78;
}

.tl-other-date {
    margin-top: 1rem;
}

.tl-other-date summary {
    width: fit-content;
    color: var(--tl-blue);
    font-weight: 650;
    cursor: pointer;
}

.tl-other-date-inner {
    margin-top: .75rem;
    max-width: 340px;
}

.tl-other-date-inner label {
    display: block;
    font-weight: 650;
    margin-bottom: .4rem;
}

.tl-other-date-inner input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--tl-border);
    border-radius: 10px;
    padding: .75rem .85rem;
    background: #fff;
    font: inherit;
}

.tl-help {
    margin: .4rem 0 0;
    color: var(--tl-muted);
    font-size: .86rem;
}

.tl-no-availability {
    padding: .9rem 1rem;
    background: #fff;
    border: 1px solid var(--tl-border);
    border-radius: 10px;
    color: var(--tl-muted);
}

.tl-slot-panel.has-date {
    border: 1px solid rgba(23, 105, 224, .12);
}

.tl-details-title {
    margin: 1.5rem 0 1rem;
}

@media (max-width: 760px) {
    .tl-date-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .tl-date-grid {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

    .tl-date-card {
        min-height: 92px;
        padding: .7rem .5rem;
    }
}


/* v1.0.6 — confirmation details and calendar actions */
.tl-confirmation-card {
    max-width: 620px;
    margin: 1.25rem auto;
    padding: 1rem 1.15rem;
    background: var(--tl-bg);
    border: 1px solid var(--tl-border);
    border-radius: 14px;
    text-align: left;
}

.tl-confirmation-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--tl-border);
}

.tl-confirmation-row:last-child {
    border-bottom: 0;
}

.tl-confirmation-row span {
    color: var(--tl-muted);
}

.tl-confirmation-row strong {
    text-align: right;
    word-break: break-word;
}

.tl-calendar-actions {
    margin-top: 1.5rem;
}

.tl-calendar-actions p {
    margin-bottom: .75rem;
}

.tl-calendar-button {
    display: inline-block;
    margin: .25rem;
    padding: .7rem 1rem;
    border-radius: 9px;
    border: 1px solid var(--tl-blue);
    color: var(--tl-blue);
    text-decoration: none;
    font-weight: 650;
}

.tl-calendar-button:hover {
    background: var(--tl-blue);
    color: #fff;
}

@media (max-width: 600px) {
    .tl-confirmation-row {
        display: block;
    }

    .tl-confirmation-row strong {
        display: block;
        margin-top: .2rem;
        text-align: left;
    }

    .tl-calendar-button {
        display: block;
        margin: .5rem 0;
    }
}


/* v1.0.7 — TutorLessons theme compatibility + month date groups */
.tl-success .tl-confirmation-card {
    background: #ffffff !important;
    color: #1f2937 !important;
}

.tl-success .tl-confirmation-row,
.tl-success .tl-confirmation-row span,
.tl-success .tl-confirmation-row strong,
.tl-success .tl-confirmation-row a {
    color: #1f2937 !important;
}

.tl-success .tl-confirmation-row span {
    color: #667085 !important;
}

.tl-success .tl-confirmation-row strong {
    font-weight: 700 !important;
    opacity: 1 !important;
}

.tl-month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tl-next-month-panel {
    margin-top: 1rem;
}

.tl-next-month-panel h4 {
    margin: 0 0 .85rem;
    color: var(--tl-text);
    font-size: 1.05rem;
}

.tl-other-date summary {
    margin-top: .25rem;
    padding: .5rem 0;
    font-size: 1rem;
}

@media (max-width: 760px) {
    .tl-month-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
