/* ============================================
   WPINFOR BOOKING - ESTILOS FRONTEND
   ============================================ */

.wpinfor-booking-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wpinfor-booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.wpinfor-booking-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.wpinfor-booking-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.wpinfor-booking-title .highlight {
    color: #667eea;
}

.wpinfor-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpinfor-form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wpinfor-select,
.wpinfor-form-group input,
.wpinfor-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

.wpinfor-select:focus,
.wpinfor-form-group input:focus,
.wpinfor-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Informações do Serviço */
.wpinfor-servico-info {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.wpinfor-servico-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.wpinfor-servico-info .info-icon {
    font-size: 18px;
}

/* Grid de Horários */
.wpinfor-horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.wpinfor-horario-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wpinfor-horario-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.wpinfor-horario-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.wpinfor-horario-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Horários Ocupados */
.wpinfor-horario-btn.ocupado {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    color: #fff !important;
    border-color: #ff9800 !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
    position: relative;
    pointer-events: auto !important;
}

.wpinfor-horario-btn.ocupado::before {
    content: '✕';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 12px;
    font-weight: bold;
    opacity: 0.9;
    z-index: 1;
}

.wpinfor-horario-btn.ocupado:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%) !important;
    transform: none !important;
    border-color: #f57c00 !important;
    opacity: 1 !important;
}

/* Calendário */
.wpinfor-booking-right {
    display: flex;
    align-items: flex-start;
}

.wpinfor-calendar-container {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wpinfor-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.wpinfor-calendar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.wpinfor-calendar-nav {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #667eea;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.wpinfor-calendar-nav:hover {
    background: #f0f4ff;
}

.wpinfor-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.wpinfor-calendar-weekdays > div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 8px 0;
}

.wpinfor-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.wpinfor-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.wpinfor-calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.wpinfor-calendar-day.available {
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
}

.wpinfor-calendar-day.available.has-slots {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    font-weight: 600;
}

.wpinfor-calendar-day.available.has-slots:hover {
    background: #c8e6c9 !important;
    transform: scale(1.05);
}

.wpinfor-calendar-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
}

.wpinfor-calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Quando está selecionado E tem slots, mostra borda verde */
.wpinfor-calendar-day.selected.has-slots {
    border: 3px solid #4caf50 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), 0 0 0 2px #4caf50 !important;
}

.wpinfor-calendar-day.today {
    border: 2px solid #667eea;
}

.wpinfor-calendar-day.disabled {
    color: #ddd;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Formulário */
.wpinfor-booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.wpinfor-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wpinfor-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.wpinfor-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#wpinfor-booking-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#wpinfor-booking-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal Personalizado */
.wpinfor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wpinfor-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
    transform: scale(1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.wpinfor-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(102, 126, 234, 0.1);
}

.wpinfor-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.wpinfor-modal-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.wpinfor-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.wpinfor-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wpinfor-modal-btn-ok,
.wpinfor-modal-btn-confirm {
    background: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wpinfor-modal-btn-ok:hover,
.wpinfor-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.wpinfor-modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
}

.wpinfor-modal-btn-cancel:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

/* Modal do Formulário de Agendamento */
.wpinfor-booking-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    overflow-y: auto;
    padding: 20px;
}

.wpinfor-booking-form-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
    margin: auto;
}

.wpinfor-booking-form-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.wpinfor-booking-form-modal-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

.wpinfor-booking-form-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.wpinfor-booking-form-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.wpinfor-booking-form-modal .wpinfor-booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 0;
}

.wpinfor-booking-form-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.wpinfor-btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpinfor-btn-secondary:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

/* Responsivo */
@media (max-width: 968px) {
    .wpinfor-booking-wrapper {
        grid-template-columns: 1fr;
    }
    
    .wpinfor-booking-right {
        order: -1;
    }
    
    .wpinfor-modal {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .wpinfor-modal-title {
        font-size: 20px;
    }
    
    .wpinfor-modal-message {
        font-size: 14px;
    }
    
    .wpinfor-modal-buttons {
        flex-direction: column;
    }
    
    .wpinfor-modal-btn {
        width: 100%;
    }
    
    .wpinfor-booking-form-modal {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .wpinfor-booking-form-modal-title {
        font-size: 20px;
    }
    
    .wpinfor-booking-form-modal-subtitle {
        font-size: 13px;
    }
    
    .wpinfor-booking-form-modal-actions {
        flex-direction: column;
    }
    
    .wpinfor-booking-form-modal-actions button {
        width: 100%;
    }
}

