/* Stili frontend Team Dance Spoleto - Prenotazioni */

.tds-booking,
.tds-my-bookings,
.tds-registration,
.tds-login,
.tds-manage-booking {
    max-width: 960px;
    margin: 20px auto;
    font-family: inherit;
    color: #222;
}

.tds-my-bookings,
.tds-registration,
.tds-login {
    max-width: 640px;
}

.tds-login {
    max-width: 420px;
}

.tds-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.tds-field--inline label {
    font-weight: 400;
    margin: 0;
}

.tds-login-footer {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
    color: #555;
}

.tds-login-footer .tds-sep {
    margin: 0 6px;
    color: #aaa;
}

.tds-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f6f7f9;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ---------------------------------------------------------------
 * Type cards (categorie)
 * --------------------------------------------------------------- */

.tds-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0 0 24px;
}

.tds-type-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    transition: all 0.15s ease;
}

.tds-type-card:hover {
    border-color: var(--tds-color, #0073aa);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.tds-type-card.is-active {
    border-color: var(--tds-color, #0073aa);
    background: #fafbff;
}

.tds-type-card__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
}

.tds-type-card__name {
    font-weight: 600;
    font-size: 16px;
}

.tds-type-card__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.tds-hint {
    text-align: center;
    color: #666;
    margin: 24px 0;
}

/* ---------------------------------------------------------------
 * Calendario settimanale
 * --------------------------------------------------------------- */

.tds-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 12px;
    flex-wrap: wrap;
}

.tds-calendar-title {
    margin: 0;
    font-size: 18px;
}

.tds-calendar-title small {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin-top: 2px;
}

.tds-calendar-nav {
    display: flex;
    gap: 6px;
}

.tds-calendar-nav .is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.tds-calendar-wrap {
    overflow-x: auto;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fff;
}

.tds-calendar {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
}

.tds-calendar th,
.tds-calendar td {
    border: 1px solid #eef0f2;
    vertical-align: top;
    padding: 0;
}

.tds-calendar__hour-col,
.tds-calendar__hour {
    width: 70px;
    background: #f9fafb;
    text-align: center;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    padding: 8px 4px;
    border-right: 2px solid #e1e4e8;
}

.tds-calendar__day-head {
    text-align: center;
    padding: 10px 6px;
    background: #f6f7f9;
    font-weight: 500;
}

.tds-calendar__day-head.is-today {
    background: #fff7d6;
}

.tds-calendar__day-name {
    text-transform: uppercase;
    font-size: 11px;
    color: #888;
    letter-spacing: 0.05em;
}

.tds-calendar__day-num {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.tds-calendar__cell {
    height: 60px;
    padding: 4px;
    position: relative;
}

.tds-calendar__cell.is-empty {
    background:
        repeating-linear-gradient(
            45deg,
            #fafbfc,
            #fafbfc 6px,
            #f0f1f3 6px,
            #f0f1f3 7px
        );
}

.tds-calendar__btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-radius: 4px;
    padding: 4px 6px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.2;
    transition: all 0.12s ease;
}

.tds-calendar__cell.is-available .tds-calendar__btn {
    background: #e7f6e7;
    color: #1f7f3a;
    border: 1px solid #b8e0b8;
    cursor: pointer;
}

.tds-calendar__cell.is-available .tds-calendar__btn:hover {
    background: #1f7f3a;
    color: #fff;
    border-color: #1f7f3a;
}

.tds-calendar__cell.is-full .tds-calendar__btn {
    background: #fcecec;
    color: #a01313;
    border: 1px solid #f1bcbc;
}

.tds-calendar__cell.is-past .tds-calendar__btn {
    background: #f4f4f4;
    color: #888;
    border: 1px dashed #ccc;
}

.tds-calendar__cell.is-selected .tds-calendar__btn {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.tds-calendar__btn-time {
    font-weight: 700;
    font-size: 13px;
}

.tds-calendar__btn-seats {
    font-size: 11px;
    margin-top: 2px;
}

.tds-legend {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.tds-legend__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

.tds-legend__dot--available { background: #e7f6e7; border: 1px solid #b8e0b8; }
.tds-legend__dot--full      { background: #c0392b; border: 1px solid #a83321; }
.tds-legend__dot--closed    { background: #6b7280; border: 1px solid #4b5563; }
.tds-legend__dot--past      { background: #cccccc; border: 1px solid #aaaaaa; }

/* Container FullCalendar pubblico */
.tds-public-calendar {
    background: #fff;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin-top: 14px;
    min-height: 480px;
}

.tds-public-calendar .fc {
    font-family: inherit;
}

.tds-public-calendar .fc-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    line-height: 1.25;
}

/* Allineamento look&feel con calendario admin + fix contrasti testo */
.tds-public-calendar .fc-toolbar-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.tds-public-calendar .fc .fc-button-primary {
    background: #2271b1;
    border-color: #2271b1;
}

.tds-public-calendar .fc .fc-button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.tds-public-calendar .fc .fc-button-primary:disabled {
    background: #8c8f94;
    border-color: #8c8f94;
}

.tds-public-calendar .fc-theme-standard th,
.tds-public-calendar .fc-theme-standard td,
.tds-public-calendar .fc-theme-standard .fc-scrollgrid {
    border-color: #dcdcde;
}

.tds-public-calendar .fc-col-header-cell {
    background: #f6f7f7;
}

.tds-public-calendar .fc-col-header-cell-cushion {
    color: #1d2327 !important;
    font-weight: 600;
}

.tds-public-calendar .fc-day-today {
    background: #fff7d6 !important;
}

.tds-public-calendar .fc-daygrid-day-number {
    color: #1d2327;
    font-weight: 600;
}

.tds-public-calendar .fc-daygrid-day.tds-day-selected {
    background: #e7f6ff !important;
    box-shadow: inset 0 0 0 2px #2271b1;
}

/* Vista mese (dot/list-item): evita testo bianco su sfondo chiaro */
.tds-public-calendar .fc-daygrid-dot-event,
.tds-public-calendar .fc-daygrid-dot-event:hover {
    background: #f6f7f7 !important;
    border: 0 !important;
    color: #1d2327 !important;
}

.tds-public-calendar .fc-daygrid-dot-event .fc-event-title {
    color: inherit !important;
    font-weight: 500;
}

.tds-public-calendar .fc-daygrid-event-dot {
    border-color: currentColor !important;
}

.tds-public-calendar .fc-list-day-cushion {
    background: #f6f7f7 !important;
}

.tds-public-calendar .fc-list-day-cushion a,
.tds-public-calendar .fc-list-event-title a,
.tds-public-calendar .fc-list-event-time {
    color: #1d2327 !important;
}

.tds-pc-evt--full {
    background: #c0392b !important;
    border-color: #a83321 !important;
    color: #fff !important;
}

.tds-pc-evt--past {
    background: #cccccc !important;
    border-color: #aaaaaa !important;
    color: #333 !important;
}

.tds-pc-evt--closed {
    background: #9ca3af !important;
    border-color: #6b7280 !important;
    color: #fff !important;
}

.entry .tds-public-calendar tr td {
    padding: 0;
}

.tds-day-slots {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fff;
}

.tds-day-slots__title {
    margin: 0 0 10px;
}

.tds-day-slots__message {
    margin: 0;
    color: #555;
}

.tds-day-slots__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.tds-day-slot-btn {
    border: 1px solid #cfd4d9;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.tds-day-slot-btn__meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
}

.tds-day-slot-btn--available {
    border-color: #b8e0b8;
    background: #e7f6e7;
    color: #1f7f3a;
}

.tds-day-slot-btn--available:hover {
    background: #d7eed7;
}

.tds-day-slot-btn--full,
.tds-day-slot-btn--past {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ---------------------------------------------------------------
 * Form prenotazione guest
 * --------------------------------------------------------------- */

.tds-booking-form-wrap {
    margin-top: 30px;
    padding: 20px;
    background: #fafbff;
    border: 1px solid #d4dcff;
    border-radius: 8px;
    scroll-margin-top: 80px;
}

.tds-booking-form-wrap h3 {
    margin-top: 0;
}

.tds-fineprint {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
}

/* Dati utente in sola lettura nel form di conferma */
.tds-field-readonly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.tds-field-readonly-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tds-field-readonly-grid .tds-field-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
}

.tds-field-readonly-grid .tds-field-value {
    font-size: 14px;
    color: #222;
}

.tds-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-size: 15px;
}

.tds-notice a {
    color: #0078d4;
}

.tds-notice--success {
    background: #e7f6e7;
    border-color: #b8e0b8;
    color: #1f7f3a;
}

.tds-notice--error {
    background: #fcecec;
    border-color: #f1bcbc;
    color: #a01313;
}

.tds-notice--warning {
    background: #fff8e1;
    border-color: #f1d18a;
    color: #8a6d3b;
}

.tds-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.tds-field label {
    font-weight: 600;
    font-size: 14px;
}

.tds-field input[type="text"],
.tds-field input[type="email"],
.tds-field input[type="tel"],
.tds-field input[type="password"],
.tds-field input[type="date"],
.tds-field input[type="time"],
.tds-field input[type="number"],
.tds-field select,
.tds-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd4d9;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}

.tds-field small {
    color: #666;
    font-size: 13px;
}

.tds-field--row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tds-field--row > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tds-field--actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.tds-button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    background: #f1f1f1;
    color: #222;
    border: 1px solid #cfd4d9;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.tds-button:hover {
    background: #e8e8e8;
}

.tds-button--primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.tds-button--primary:hover {
    background: #005d88;
    border-color: #005d88;
    color: #fff;
}

.tds-button--danger {
    background: #fcecec;
    border-color: #f1bcbc;
    color: #a01313;
}

.tds-button--danger:hover {
    background: #f5d6d6;
}

.tds-button--small {
    padding: 6px 12px;
    font-size: 13px;
}

.tds-bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    margin-bottom: 24px;
    background: #fff;
}

.tds-bookings-table th,
.tds-bookings-table td {
    padding: 12px;
    border: 1px solid #e1e4e8;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.tds-bookings-table th {
    background: #f6f7f9;
    font-weight: 600;
}

.tds-bookings-table--past {
    opacity: 0.85;
}

.tds-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.tds-types-info {
    margin-top: 30px;
    background: #f9fafb;
    padding: 16px 20px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.tds-types-info summary {
    cursor: pointer;
    font-weight: 600;
}

.tds-types-info__item {
    margin-top: 12px;
}

.tds-types-info__item h4 {
    margin: 0 0 6px;
}

@media (max-width: 520px) {
    .tds-field--row {
        grid-template-columns: 1fr;
    }
    .tds-bookings-table thead {
        display: none;
    }
    .tds-bookings-table,
    .tds-bookings-table tbody,
    .tds-bookings-table tr,
    .tds-bookings-table td {
        display: block;
        width: 100%;
    }
    .tds-bookings-table tr {
        margin-bottom: 14px;
        border: 1px solid #e1e4e8;
        border-radius: 6px;
        overflow: hidden;
    }
    .tds-bookings-table td {
        border: none;
        border-bottom: 1px solid #f1f1f1;
    }
    .tds-bookings-table td:last-child {
        border-bottom: none;
    }
}
