/**
 * Foglio di stile CSS per il Widget Appuntamenti (Diana Informatica layout).
 */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

#diana-booking-widget {
    --brand-deep-blue: #173f8a;
    --soft-cream: #FDF6E3;
    --slate-gray: #586E75;
    --brand-gold: #c9a44c;
    --success-green: #859900;
    --font-title: 'Lato', sans-serif;
    --font-text: 'Lato', sans-serif;
    
    font-family: var(--font-text);
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    box-sizing: border-box;
}

#diana-booking-widget * {
    box-sizing: border-box;
}

/* Griglia Principale */
.booking-card {
    display: flex;
    background: #FFF;
    border: 1px solid #DDD6C1;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(23, 63, 138, 0.08);
    overflow: hidden;
    min-height: 520px;
}

/* Colonna Sinistra (Sidebar Dettagli) */
.booking-sidebar {
    width: 30%;
    background: #FDF6E3;
    border-right: 1px solid #EEE8D5;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
}

.booking-company {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--slate-gray);
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.booking-meeting-title {
    font-family: var(--font-title);
    color: var(--brand-deep-blue);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.3;
}

.booking-meeting-info {
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--slate-gray);
    font-size: 0.95rem;
}

.info-icon {
    width: 20px;
    height: 20px;
    color: var(--brand-gold);
}

.booking-description {
    color: var(--slate-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: auto; /* Spinge il bottone sotto in fondo */
}

.btn-fallback-trigger {
    background: none;
    border: none;
    color: var(--brand-deep-blue);
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    padding: 0;
    margin-top: 25px;
    transition: color 0.2s ease;
}

.btn-fallback-trigger:hover {
    color: var(--brand-gold);
}

/* Colonna Destra (Main Area) */
.booking-main {
    width: 70%;
    padding: 40px;
    display: flex;
    gap: 30px;
}

/* Pannello Calendario */
.calendar-panel {
    flex: 1;
}

.widget-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cal-month-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #073642;
}

.cal-nav-btn {
    background: #FFF;
    border: 1px solid #DDD6C1;
    color: var(--slate-gray);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s ease;
}

.cal-nav-btn:hover {
    background: var(--brand-deep-blue);
    color: #FFF;
    border-color: var(--brand-deep-blue);
}

.widget-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-name {
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--slate-gray);
    padding: 8px 0;
}

.cal-cell {
    aspect-ratio: 1;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
    color: #93a1a1;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.cal-cell.day.available {
    background-color: rgba(23, 63, 138, 0.05);
    color: var(--brand-deep-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-cell.day.available:hover {
    background-color: rgba(23, 63, 138, 0.15);
    transform: scale(1.05);
}

.cal-cell.day.selected {
    background-color: var(--brand-deep-blue) !important;
    color: #FFF !important;
}

.cal-cell.today {
    border: 2px solid var(--brand-gold);
}

/* Pannello Slot Orari */
.time-panel {
    width: 200px;
    border-left: 1px solid #EEE8D5;
    padding-left: 25px;
    display: flex;
    flex-direction: column;
}

.time-panel-placeholder {
    color: var(--slate-gray);
    font-size: 0.85rem;
    text-align: center;
    margin: auto 0;
    line-height: 1.5;
}

.time-panel-header {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--brand-deep-blue);
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #EEE8D5;
    padding-bottom: 8px;
}

.time-slots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 380px;
}

.time-slot-btn {
    background: #FFF;
    border: 1px solid var(--brand-deep-blue);
    color: var(--brand-deep-blue);
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

.time-slot-btn:hover {
    background: var(--brand-deep-blue);
    color: #FFF;
}

/* Wizard / Form Container */
.form-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.btn-back {
    background: none;
    border: none;
    color: var(--slate-gray);
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
    padding: 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.btn-back:hover {
    color: var(--brand-deep-blue);
}

.form-title {
    font-family: var(--font-title);
    color: var(--brand-deep-blue);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.selected-summary {
    background: #FDF6E3;
    border: 1px solid #EEE8D5;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.form-group-widget {
    margin-bottom: 15px;
}

.form-label-widget {
    display: block;
    font-weight: 700;
    color: var(--slate-gray);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.form-control-widget {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #DDD6C1;
    border-radius: 6px;
    font-family: var(--font-text);
    font-size: 0.95rem;
    outline: none;
    color: #073642;
    background-color: #FFF;
    transition: border-color 0.2s ease;
}

.form-control-widget:focus {
    border-color: var(--brand-deep-blue);
}

.btn-submit-widget {
    background: var(--brand-deep-blue);
    color: #FFF;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.2s ease;
}

.btn-submit-widget:hover {
    background: #0f2b5f;
}

/* Success Container */
.success-container {
    width: 100%;
    text-align: center;
    margin: auto 0;
}

.success-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(133, 153, 0, 0.1);
    border: 2px solid var(--success-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-icon {
    width: 32px;
    height: 32px;
    color: var(--success-green);
}

.success-heading {
    font-family: var(--font-title);
    color: var(--brand-deep-blue);
    margin-top: 0;
    margin-bottom: 10px;
}

.success-text {
    color: var(--slate-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.appointment-summary-card {
    background: #FDF6E3;
    border: 1px solid #EEE8D5;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.appointment-summary-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--brand-deep-blue);
    border-bottom: 1px solid #EEE8D5;
    padding-bottom: 6px;
}

.appointment-summary-card p {
    margin: 6px 0;
    font-size: 0.9rem;
    color: #073642;
}

/* Responsive / Mobile Adaptation */
@media (max-width: 768px) {
    .booking-card {
        flex-direction: column;
    }
    .booking-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #EEE8D5;
        padding: 30px 20px;
    }
    .booking-main {
        width: 100%;
        flex-direction: column;
        padding: 30px 20px;
        gap: 25px;
    }
    .time-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #EEE8D5;
        padding-left: 0;
        padding-top: 25px;
    }
}
