/* Appointment Booking – Premium Frontend */
.wpappsws-premium {
    max-width: 900px;
    margin: 0 auto;
    color: #333;
}
.wpappsws-error {
    padding: 20px;
    background: #fff8f8;
    border: 1px solid #ffcccc;
    color: #d32f2f;
    border-radius: 8px;
    text-align: center;
}
/* === Tipo singolo === */
.wpappsws-premium-type-single {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}
.wpappsws-type-header h2 {
    margin: 12px 0;
    font-size: 1.8em;
    color: #222;
}
/* === Griglia tipi === */
.wpappsws-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0 40px;
}
.wpappsws-type-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}
.wpappsws-type-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.wpappsws-label-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 12px;
}
.wpappsws-meta {
    font-size: 0.95em;
    color: #666;
    margin: 12px 0;
}
.wpappsws-btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
    font-size: 1em;
}
.wpappsws-btn-primary:hover {
    background: #005a2e;
    transform: scale(1.03);
}
/* === Calendario === */
.wpappsws-calendar {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    margin: 20px 0;
}
.wpappsws-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.wpappsws-calendar-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #222;
}
.wpappsws-cal-nav {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.wpappsws-cal-nav:hover {
    background: #004d26;
}
.wpappsws-calendar-weekdays,
.wpappsws-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.wpappsws-calendar-weekdays > div {
    text-align: center;
    font-weight: 700;
    font-size: 0.85em;
    color: #555;
    padding: 8px 0;
}
.wpappsws-calendar-days > div {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    font-weight: 600;
}
.wpappsws-cal-empty {
    background: transparent;
}
.wpappsws-cal-available {
    background: #e8f5e9;
    color: #2e7d32;
    cursor: pointer;
}
.wpappsws-cal-available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
}
.wpappsws-cal-unavailable {
    color: #bbb;
    background: #f9f9f9;
}
/* === Slot orari === */
.wpappsws-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
    justify-content: center;
}
.wpappsws-time-slot {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    transition: all 0.2s;
}
.wpappsws-time-slot:hover,
.wpappsws-time-slot.active {
    border-color: var(--primary);
    background: #f0f9f4;
    color: var(--primary);
}
.wpappsws-time-slot.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: #999;
}
.wpappsws-time-slot small {
    display: block;
    font-size: 0.8em;
    margin-top: 4px;
}
.wpappsws-time-slot small[style*="color:var(--primary)"] {
    font-weight: 600;
}
.wpappsws-time-slot small[style*="color:#d32f2f"] {
    font-style: italic;
}
/* === Form cliente === */
.wpappsws-client-form-container {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    margin: 20px 0;
}
.wpappsws-client-form-container h4 {
    margin-top: 0;
    color: #222;
}
.wpappsws-client-form-container label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    color: #444;
}
.wpappsws-client-form-container input,
.wpappsws-client-form-container textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
}
.wpappsws-client-form-container input:focus,
.wpappsws-client-form-container textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 116, 62, 0.15);
}
/* 🔥 iOS fix: evita lo zoom automatico */
.wpappsws-client-form-container input[type="text"],
.wpappsws-client-form-container input[type="email"],
.wpappsws-client-form-container input[type="tel"],
.wpappsws-client-form-container textarea {
    font-size: 16px;
}
.wpappsws-client-instructions {
    background: #f0f9f4;
    padding: 16px;
    border-radius: 10px;
    margin: 16px 0;
    font-style: italic;
    color: #2e7d32;
    border-left: 3px solid var(--primary);
}
.wpappsws-success {
    text-align: center;
    padding: 30px;
    background: #e8f5e9;
    border-radius: 16px;
    margin: 20px 0;
}
.wpappsws-success h4 {
    color: #2e7d32;
    margin-top: 0;
}
/* Loader */
.wpappsws-loader {
    text-align: center;
    padding: 30px;
    color: #777;
}
.wpappsws-loader::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(27,116,62,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ✅ Responsive migliorato per mobile */
@media (max-width: 600px) {
    .wpappsws-type-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wpappsws-calendar-days > div {
        height: 36px;
        font-size: 0.85em;
    }
    .wpappsws-calendar-header h3 {
        font-size: 1.2em;
    }
    .wpappsws-btn-primary {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    .wpappsws-time-slot {
        min-width: auto;
        padding: 8px 12px;
        flex: 1;
        font-size: 0.9em;
    }
    .wpappsws-time-slot small {
        font-size: 0.75em;
    }
    .wpappsws-client-form-container {
        padding: 16px;
    }
    .wpappsws-client-form-container input,
    .wpappsws-client-form-container textarea {
        padding: 10px;
    }
}