/* ==========================================================
   Akesios Booking – Frontend Styles
   ========================================================== */

/* Container */
.akb-booking-form {
    margin: 24px 0;
    padding: 24px;
    background: #f7fbfe;
    border: 1px solid #d0e8f5;
    border-radius: 8px;
}

.akb-booking-form h3 {
    margin: 0 0 20px;
    color: #2b96c2;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid #2b96c2;
    padding-bottom: 10px;
}

/* Fields */
.akb-field {
    margin-bottom: 16px;
}

.akb-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.akb-field label .required {
    color: #c00;
    margin-left: 2px;
}

.akb-field select,
.akb-field input[type="text"],
.akb-field input[type="email"],
.akb-field input[type="tel"],
.akb-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c4dcea;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.akb-field select:focus,
.akb-field input:focus,
.akb-field textarea:focus {
    border-color: #2b96c2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 150, 194, 0.15);
}

.akb-field textarea {
    height: 80px;
    resize: vertical;
}

/* Time Slots Grid */
.akb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 8px;
    min-height: 48px;
}

.akb-slot-btn {
    padding: 8px 4px;
    background: #fff;
    border: 1.5px solid #2b96c2;
    border-radius: 6px;
    color: #2b96c2;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.akb-slot-btn:hover {
    background: #2b96c2;
    color: #fff;
}

.akb-slot-btn.selected {
    background: #2b96c2;
    color: #fff;
    border-color: #1a7fa8;
    box-shadow: 0 2px 6px rgba(43, 150, 194, 0.35);
}

.akb-slot-btn.booked {
    background: #f0f0f0;
    border-color: #ccc;
    color: #aaa;
    cursor: not-allowed;
    text-decoration: line-through;
}

.akb-slots-loading {
    font-size: 13px;
    color: #888;
    padding: 8px 0;
    display: none;
}

.akb-slots-empty {
    font-size: 13px;
    color: #c00;
    padding: 8px 0;
    display: none;
}

/* Patient Section */
#akb-patient-section {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #c4dcea;
}

#akb-patient-section h4 {
    margin: 0 0 16px;
    font-size: 15px;
    color: #555;
    font-weight: 600;
}

/* Prenota Ora button */
#akb-prenota-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #c4dcea;
}

.akb-prenota-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #2b96c2;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.akb-prenota-btn:hover {
    background: #1a7fa8;
    box-shadow: 0 4px 12px rgba(43, 150, 194, 0.4);
}

/* Two-column layout for patient fields on desktop */
@media (min-width: 640px) {
    .akb-fields-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 16px;
    }
}

/* Summary */
.akb-summary {
    display: none;
    background: #e8f4fb;
    border: 1px solid #b0d8ee;
    border-left: 4px solid #2b96c2;
    border-radius: 6px;
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 14px;
}

.akb-summary h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #2b96c2;
}

.akb-summary table {
    width: 100%;
    border-collapse: collapse;
}

.akb-summary td {
    padding: 4px 0;
    vertical-align: top;
}

.akb-summary td:first-child {
    font-weight: 600;
    color: #555;
    width: 110px;
}

/* Bottone rimuovi nel riepilogo ordine checkout */
.akb-checkout-remove {
    display: inline-block;
    margin-left: 8px;
    color: #cc0000;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    vertical-align: middle;
}

.akb-checkout-remove:hover {
    color: #990000;
    text-decoration: none;
}

/* Block checkout remove button (wp.data approach) */
.akb-block-remove {
    display: inline-block;
    margin-left: 8px;
    color: #cc0000;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.akb-block-remove:hover {
    color: #990000;
}

.akb-block-remove:disabled {
    opacity: 0.4;
    cursor: default;
}

.akb-remove-feedback {
    display: none;
    background: #fff3f3;
    border: 1px solid #f5c2c2;
    border-left: 4px solid #cc0000;
    border-radius: 6px;
    padding: 12px 14px;
    color: #cc0000;
    font-size: 13px;
    margin-top: 12px;
}

/* Flatpickr overrides */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #2b96c2;
    border-color: #2b96c2;
}

.flatpickr-day:hover {
    background: #e8f4fb;
}
