/**
 * Archivo: assets/css/frontend.css
 * Estilos para el frontend del plugin
 */

/* ========================================
   BOTÓN DE RESERVA
   ======================================== */

.jlcr-booking-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0066cc 0%, #00cc88 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.jlcr-booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    background: linear-gradient(135deg, #0052a3 0%, #00a370 100%);
}

.jlcr-booking-btn:active {
    transform: translateY(0);
}

.jlcr-btn-icon {
    font-size: 24px;
}

/* ========================================
   MODAL
   ======================================== */

.jlcr-modal {
    max-width: 650px;
    width: 95%;
    padding: 0;
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    background-color: #ffffff;
    height: auto;
    overflow: visible;
}

.jlcr-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.jlcr-modal-content {
    padding: 0;
}

/* Header del Modal */
.jlcr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, #0066cc 0%, #00cc88 100%);
    color: #ffffff;
}

.jlcr-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.jlcr-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.jlcr-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Body del Modal */
.jlcr-modal-body {
    padding: 30px;
    min-height: 300px;
}

/* ========================================
   PASOS DEL FORMULARIO
   ======================================== */

.jlcr-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jlcr-step h3 {
    color: #0066cc;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ========================================
   CALENDARIO (FLATPICKR)
   ======================================== */

.jlcr-calendar-container {
    margin-top: 20px;
}

/* Asegurar que el calendario ocupe su lugar correctamente */
.jlcr-calendar-container {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    min-height: 320px;
    /* Espacio para el calendario */
}

#jlcr-inline-calendar {
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.jlcr-calendar-container input {
    display: none !important;
}

.flatpickr-calendar.inline {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.jlcr-modal {
    max-height: 90vh;
    /* Para evitar desbordamientos en pantallas pequeñas */
    overflow-y: auto;
}

/* ========================================
   FORMULARIO DE TELÉFONO
   ======================================== */

.jlcr-form-group {
    margin-bottom: 24px;
}

.jlcr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.jlcr-form-group input[type="tel"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.jlcr-form-group input[type="tel"]:focus {
    outline: none;
    border-color: #0066cc;
}

.jlcr-field-description {
    margin-top: 6px;
    font-size: 14px;
    color: #666;
}

/* ========================================
   SLOTS DE TIEMPO
   ======================================== */

.jlcr-selected-date {
    background-color: #f0f8ff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #0066cc;
    font-size: 15px;
}

.jlcr-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.jlcr-slot {
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    background-color: #f0f8ff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.jlcr-slot:hover {
    background-color: #0066cc;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.jlcr-slot-selected {
    background-color: #00cc88;
    color: #ffffff;
    border-color: #00cc88;
}

.jlcr-slot-selected:hover {
    background-color: #00a370;
    border-color: #00a370;
}

/* ========================================
   BOTONES
   ======================================== */

.jlcr-btn-primary,
.jlcr-btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.jlcr-btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #00cc88 100%);
    color: #ffffff;
    margin-left: 12px;
}

.jlcr-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.jlcr-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.jlcr-btn-secondary:hover {
    background-color: #e0e0e0;
}

.jlcr-btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ========================================
   MENSAJES Y ALERTAS
   ======================================== */

.jlcr-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 15px;
}

.jlcr-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jlcr-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.jlcr-message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.jlcr-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 16px;
}

.jlcr-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.jlcr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.jlcr-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.jlcr-loading p {
    margin-top: 16px;
    color: #666;
    font-size: 15px;
}

/* ========================================
   MODAL DE LOGIN
   ======================================== */

.jlcr-login-content {
    text-align: center;
}

.jlcr-login-message {
    padding: 20px 0;
}

.jlcr-icon-lock {
    font-size: 64px;
    margin-bottom: 16px;
}

.jlcr-login-message p {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

.jlcr-subtitle {
    color: #666;
    font-size: 14px;
}

.jlcr-login-actions {
    margin: 30px 0;
}

.jlcr-login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.jlcr-login-footer small {
    color: #999;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .jlcr-modal {
        width: 95%;
        max-width: none;
    }

    .jlcr-modal-body {
        padding: 20px;
    }

    .jlcr-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .jlcr-slot {
        padding: 12px;
        font-size: 16px;
    }

    .jlcr-booking-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}