/* ========================================
   WP Smart Calendar - Stylesheet
   Design exato do Thermas da Mata
   ======================================== */

.wpsc-wrapper {
    width: 100%;
    max-width: 460px;
    margin: 30px auto;
    margin-right: 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wpsc-calendar-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* ========================================
   Header com navegação
   ======================================== */

.wpsc-header {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    padding: 10px 10px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpsc-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpsc-calendar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wpsc-header-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: capitalize;
}

.wpsc-nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wpsc-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.wpsc-current-month {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: capitalize;
    min-width: 160px;
    text-align: center;
}

/* ========================================
   Calendário - Grid
   ======================================== */

.wpsc-calendar {
    padding: 0;
}

.wpsc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 16px 20px;
}

.wpsc-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #666;
}

.wpsc-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 0 20px 24px 20px;
}

/* ========================================
   Células do calendário
   ======================================== */

.wpsc-day {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: none;
}

.wpsc-day-number {
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
}

.wpsc-day-price {
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1;
}

/* Status: Promoção (Verde) */
.wpsc-day.status-promo {
    background: #10B981;
    color: white;
}

.wpsc-day.status-promo:hover {
    background: #059669;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status: Normal (Azul) */
.wpsc-day.status-normal {
    background: #3B82F6;
    color: white;
}

.wpsc-day.status-normal:hover {
    background: #2563eb;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status: Fechado/Indisponível (Cinza) */
.wpsc-day.status-closed {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

.wpsc-day.status-closed:hover {
    transform: none;
    box-shadow: none;
}

/* Dia vazio (sem dados) */
.wpsc-day.empty {
    background: transparent;
    cursor: default;
}

.wpsc-day.empty:hover {
    transform: none;
}

/* Dia passado */
.wpsc-day.past {
    opacity: 0.4;
    cursor: not-allowed;
}

.wpsc-day.past:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   Tooltip (opcional)
   ======================================== */

.wpsc-day[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* ========================================
   Informações extras
   ======================================== */

.wpsc-info {
    background: #FEF3C7;
    padding: 16px 20px;
    border-radius: 0 0 20px 20px;
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
}

.wpsc-info p {
    margin: 0;
}

.wpsc-info strong {
    font-weight: 700;
}

.wpsc-opening-hours {
    padding: 12px 20px;
    font-size: 13px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ========================================
   Loading state
   ======================================== */

.wpsc-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #9ca3af;
}

.wpsc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: wpsc-spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes wpsc-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Responsividade
   ======================================== */

@media (max-width: 520px) {
    .wpsc-wrapper {
        margin: 15px;
        max-width: calc(100% - 30px);
    }
    
    .wpsc-header {
        padding: 10px 15px;
    }
    
    .wpsc-header-content {
        flex-direction: row;
        gap: 10px;
    }
    
    .wpsc-header-title {
        font-size: 13px;
    }
    
    .wpsc-current-month {
        font-size: 13px;
    }
    
    .wpsc-calendar-icon {
        width: 18px;
        height: 18px;
    }
    
    .wpsc-day {
        width: auto;
        height: auto;
        min-height: 50px;
    }
    
    .wpsc-day-number {
        font-size: 14px;
    }
    
    .wpsc-day-price {
        font-size: 10px;
    }
    
    .wpsc-days {
        gap: 6px;
        padding: 0 12px 20px 12px;
    }
    
    .wpsc-weekdays {
        gap: 6px;
        padding: 12px 12px;
    }
}

@media (max-width: 380px) {
    .wpsc-header-left {
        gap: 6px;
    }
    
    .wpsc-header-title {
        font-size: 11px;
    }
    
    .wpsc-current-month {
        font-size: 11px;
    }
    
    .wpsc-nav-btn {
        padding: 3px 8px;
        font-size: 16px;
    }
    
    .wpsc-day {
        min-height: 45px;
    }
    
    .wpsc-days {
        gap: 4px;
    }
    
    .wpsc-weekdays {
        gap: 4px;
    }
    
    .wpsc-day-number {
        font-size: 13px;
    }
    
    .wpsc-day-price {
        font-size: 9px;
    }
}

/* ========================================
   Estado de erro
   ======================================== */

.wpsc-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
}

.wpsc-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.wpsc-error-message {
    margin: 0;
    font-size: 14px;
}

.wpsc-retry-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.wpsc-retry-btn:hover {
    background: #2563eb;
}
