/*
 * Calendar / Appuntamenti View — OpenAI-inspired
 * White, no hover, solid buttons, Plus Jakarta Sans
 */

/* Container */
#view-appuntamenti {
    padding: 32px 28px !important;
    max-width: 680px;
    margin: 0 auto;
    background: #fff !important;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* Header */
.cl-appt-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 0;
    margin-bottom: 24px;
    background: none;
    border-bottom: none;
    position: static;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.cl-appt-header-text { flex: 1; }

.cl-appt-title {
    font-size: 28px;
    font-weight: 700;
    color: #0d0d0d;
    margin: 0 0 4px;
    letter-spacing: -0.04em;
    line-height: 1.15;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cl-appt-sub {
    font-size: 15px;
    color: #666;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Month nav */
.cl-appt-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-top: 4px;
}

.cl-appt-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    color: #0d0d0d;
    cursor: pointer;
    transition: none;
    flex-shrink: 0;
}

.cl-appt-nav-btn:hover { background: #fff; border-color: #e5e5e5; }
.cl-appt-nav-btn:active { opacity: 0.7; }

.cl-appt-nav-btn i {
    width: 16px;
    height: 16px;
}

.cl-appt-month-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0d0d0d;
    white-space: nowrap;
    text-transform: capitalize;
    min-width: 120px;
    text-align: center;
}

/* Calendar grid */
.cl-appt-cal-wrap {
    margin: 0 0 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
    animation: none;
}

.cl-appt-cal-days-hdr {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.cl-appt-cal-day-name {
    padding: 10px 2px;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cl-appt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cl-appt-cal-cell {
    min-height: 40px;
    padding: 4px 2px;
    text-align: center;
    position: relative;
}

.cl-appt-cal-cell.cl-other-month .cl-appt-day-num {
    color: #ccc;
    opacity: 1;
}

.cl-appt-cal-cell.cl-today .cl-appt-day-num {
    background: #0d0d0d;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: none;
}

.cl-appt-day-num {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #0d0d0d;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 8px;
    transition: none;
}

/* Loading / empty */
.appt-client-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 56px 24px;
    text-align: center;
    color: #999;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.appt-client-state p {
    margin: 0;
    max-width: 280px;
    color: #999;
}

.cl-appt-empty-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 12px;
    color: #ccc;
    box-shadow: none;
    border: none;
}

.cl-appt-empty-icon svg {
    width: 22px;
    height: 22px;
}

/* Section label */
.appt-section-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    padding: 0;
    margin: 0 0 12px;
}

/* Cards container */
#appt-client-cards {
    padding: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Booking card */
.appt-booking-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: none;
    transition: none;
    animation: cal-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.appt-booking-card:nth-child(2) { animation-delay: .04s; }
.appt-booking-card:nth-child(3) { animation-delay: .08s; }
.appt-booking-card:nth-child(4) { animation-delay: .12s; }

@keyframes cal-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.appt-booking-card:hover { border-color: #e5e5e5; }

.appt-booking-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.appt-booking-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0d0d0d;
    border: none;
}

.appt-booking-card-icon i {
    width: 18px;
    height: 18px;
}

.appt-booking-card-info { flex: 1; min-width: 0; }

.appt-booking-card-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0d0d0d;
    margin: 0 0 2px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.appt-booking-card-desc {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* Badges */
.appt-booking-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.appt-client-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.appt-client-badge.fiscal   { background: #eef2ff; color: #4f46e5; }
.appt-client-badge.labor    { background: #f0fdf4; color: #16a34a; }
.appt-client-badge.finance  { background: #fffbeb; color: #a16207; }
.appt-client-badge.general  { background: #fafafa; color: #666; }
.appt-client-badge.remote   { background: #f0fdf4; color: #16a34a; }
.appt-client-badge.in-person { background: #faf5ff; color: #7c3aed; }
.appt-client-badge.virtual  { background: #f0fdf4; color: #16a34a; }
.appt-client-badge.custom   { background: #fffbeb; color: #a16207; }
.appt-client-badge.both     { background: #fafafa; color: #666; }

/* Action buttons — solid, no hover */
.appt-booking-card-actions {
    display: flex;
    gap: 8px;
}

.appt-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: none;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    letter-spacing: -0.01em;
}

.appt-book-btn:active { opacity: 0.85; }

.appt-book-btn-primary {
    background: #0d0d0d;
    color: #fff;
    box-shadow: none;
}

.appt-book-btn-primary:hover {
    background: #0d0d0d;
    box-shadow: none;
}

.appt-book-btn-secondary {
    background: #fafafa;
    color: #0d0d0d;
    border: 1px solid #e5e5e5;
}

.appt-book-btn-secondary:hover {
    background: #fafafa;
    border-color: #e5e5e5;
}

.appt-book-btn i {
    width: 15px;
    height: 15px;
}

/* Responsive */
@media (max-width: 767px) {
    #view-appuntamenti {
        padding: 20px 16px !important;
    }
    .cl-appt-header {
        flex-direction: column;
        gap: 12px;
    }
    .cl-appt-nav {
        align-self: flex-start;
    }
}
