/**
 * Estilos para o Calendário Público
 */

/* ============================================
   HEADER PÚBLICO
   ============================================ */

.public-header {
    background: var(--bg-card);
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.public-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.public-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-logo img {
    width: 40px;
    height: 40px;
}

.public-logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.public-logo-text p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    border-radius: 24px;
    margin-bottom: 48px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
}

.hero p {
    font-size: clamp(16px, 3vw, 20px);
    color: var(--text-tertiary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CALENDÁRIO
   ============================================ */

.calendar-section {
    margin-bottom: 48px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-tertiary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.day-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.day-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.day-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.day-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.day-date {
    flex: 1;
}

.day-weekday {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.day-number {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.day-month {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.day-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-aberto {
    background: rgba(52, 199, 89, 0.15);
    color: var(--color-success);
}

.badge-lotado {
    background: rgba(255, 149, 0, 0.15);
    color: var(--color-warning);
}

.badge-fechado {
    background: rgba(255, 59, 48, 0.15);
    color: var(--color-danger);
}

.day-card-body {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.day-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.day-info svg {
    width: 18px;
    height: 18px;
    fill: var(--text-tertiary);
}

.day-card-footer {
    margin-top: 16px;
}

.btn-reservar {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reservar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-tertiary);
}

/* ============================================
   MODAL DE RESERVA
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 28px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title svg {
    width: 20px;
    height: 20px;
    fill: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 20px;
}

.checkbox-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-field label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.checkbox-field label strong {
    display: block;
    margin-bottom: 4px;
}

.checkbox-field label span {
    font-size: 13px;
    color: var(--text-tertiary);
}

.modal-footer {
    padding: 20px 28px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

/* ============================================
   ajuste mobile: RESPONSIVIDADE
   ============================================ */

/* Mobile First: Base styles acima já são mobile */
@media (max-width: 767px) {
    .public-header {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .public-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .hero {
        padding: 40px 20px;
        border-radius: 16px;
        margin-bottom: 32px;
    }
    
    .hero-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }
    
    /* Calendário empilhado no mobile */
    .calendar-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Formulários full-width */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Botões touch-friendly (44px min) */
    .btn, button, input[type="submit"] {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* Modal fullscreen no mobile */
    .modal {
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: ≥1024px */
@media (min-width: 1024px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
