@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --primary: #9c27b0;
    --primary-light: #bb6bc9;
    --primary-dark: #7b1fa2;
    --bg-dark: #121212;
    --bg-card: #1e1e2f;
    --text-light: #ffffff;
    --text-muted: #b3b3cc;
    --border-color: #2d2d42;
    --hover-color: #2a2a40;
    --success: #4CAF50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#paypal-container {
  display: none !important;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(90, 92, 106, 0.1) 0%, rgba(32, 45, 58, 0.1) 81.3%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(156, 39, 176, 0.3);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary);
    border-radius: 30px;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--primary);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.form-container {
    background-color: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-light);
}

.form-group {
    margin-bottom: 20px;
}

input, select {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: rgba(45, 45, 66, 0.5);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.half {
    width: 50%;
}

.horarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
/*
.hora-btn {
    text-align: center;
    padding: 12px 8px;
    background-color: rgba(45, 45, 66, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    font-size: 0.9em;
}*/

/* Nuevo*/

.hora-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  margin: 4px;
  min-width: 80px;
  text-align: center;
  border-radius: 8px;
  background-color: #eee;
  color: #333;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hora-btn:hover {
  background-color: #ddd;
}

/* */

.hora-btn.available {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.hora-btn.available:hover {
    background-color: rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.hora-btn.booked {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    cursor: not-allowed;
}

.hora-btn.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.4);
    transform: scale(1.05);
}

.hora-btn:hover {
    background-color: var(--hover-color);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgba(156, 39, 176, 0.1);
}

.disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.payment-gateways {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.payment-gateway-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.paypal-btn {
    background-color: #0070ba;
    color: white;
}

.paypal-btn:hover {
    background-color: #005ea6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 112, 186, 0.3);
}

.stripe-btn {
    background-color: #635bff;
    color: white;
}

.stripe-btn:hover {
    background-color: #5851e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 91, 255, 0.3);
}

.payment-gateway-btn i {
    font-size: 1.2rem;
}

.resumen-reserva {
    background-color: rgba(45, 45, 66, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.resumen-reserva h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-light);
}

#detalles-reserva {
    color: var(--text-muted);
}

.active-section {
    display: block;
}

section:not(.active-section) {
    display: none;
}
/*
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}*/


.modal {
  position: fixed;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
}

.modal-content {
  background-color: #1f1f2e;
  color: white;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
  color: #9c27b0;
  font-size: 1.4em;
  margin-bottom: 15px;
}

.modal-content p {
  font-size: 0.95em;
  line-height: 1.6em;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}
/*
.modal-content {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}*/

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

.fa-envelope-check {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

#confirmacion-detalles {
    margin: 20px 0;
    text-align: left;
    background-color: rgba(45, 45, 66, 0.5);
    padding: 15px;
    border-radius: 8px;
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.consulta-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.filtros-container {
    background-color: rgba(45, 45, 66, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filtro-group {
    display: flex;
    flex-direction: column;
}

.filtro-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.filtro-input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: rgba(45, 45, 66, 0.5);
    color: var(--text-light);
    font-size: 0.9rem;
}

#citas-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(45, 45, 66, 0.2);
}

.cita-item {
    background-color: rgba(45, 45, 66, 0.5);
    margin: 10px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.cita-item:hover {
    background-color: rgba(45, 45, 66, 0.7);
    transform: translateX(5px);
}

.cita-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cita-tipo {
    font-weight: 600;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.cita-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cita-status.confirmed {
    background-color: var(--success);
    color: white;
}

.cita-status.reserved {
    background-color: #ffa726;
    color: white;
}

.cita-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cita-info p {
    margin: 2px 0;
}

.cita-info strong {
    color: var(--text-light);
}

.consulta-stats {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(45, 45, 66, 0.3);
    border-radius: 6px;
    color: var(--text-muted);
}

.no-citas {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Availability Modal Styles */
.availability-modal {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.85);
}

.availability-modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 30, 47, 0.95) 100%);
    border: 2px solid var(--primary);
    box-shadow: 0 20px 60px rgba(156, 39, 176, 0.3);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.availability-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.availability-icon {
    font-size: 3.5rem;
    color: var(--primary-light);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(156, 39, 176, 0.5);
}

.availability-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.availability-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.selected-appointment-card {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1) 0%, rgba(45, 45, 66, 0.3) 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.appointment-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.appointment-detail:last-child {
    border-bottom: none;
}

.appointment-detail.selected-time {
    background: rgba(156, 39, 176, 0.2);
    margin: 10px -10px -10px -10px;
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid var(--primary);
}

.appointment-detail i {
    font-size: 1.2rem;
    color: var(--primary-light);
    width: 20px;
    text-align: center;
}

.appointment-detail div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.appointment-detail strong {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.appointment-detail span {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.available-hours-section {
    margin-bottom: 25px;
}

.available-hours-section h3 {
    font-size: 1.3rem;
    color: var(--primary-light);
    margin-bottom: 15px;
    text-align: center;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.hour-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.hour-status.available {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.hour-status.booked {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    opacity: 0.6;
}

.hour-status.selected-hour {
    background-color: rgba(156, 39, 176, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.4);
    transform: scale(1.05);
}

.hour-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.hour-status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hora-btn.available .hour-status-label {
    color: #4CAF50;
}

.hora-btn.booked .hour-status-label {
    color: #f44336;
}

.hora-btn.selected .hour-status-label {
    color: white;
}

.hours-legend-inline {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.hours-legend-inline .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hours-legend-inline .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hours-legend-inline .legend-color.available {
    background-color: rgba(76, 175, 80, 0.6);
}

.hours-legend-inline .legend-color.booked {
    background-color: rgba(244, 67, 54, 0.6);
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-btn, .cancel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 180px;
    justify-content: center;
}

.confirm-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.5);
}

.cancel-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-color: var(--text-muted);
}

.date-help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
    margin-bottom: 0;
    text-align: center;
}

.no-date-selected {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: rgba(45, 45, 66, 0.3);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.no-date-selected p {
    margin: 0;
    font-style: italic;
}

.availability-close {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.availability-close:hover {
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .horarios {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .availability-modal-content {
        margin: 10px;
        padding: 20px;
    }
    
    .hours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirm-btn, .cancel-btn {
        width: 100%;
    }
    
    .hours-legend {
        justify-content: space-around;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .horarios {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .half {
        width: 100%;
    }
    
    .payment-options {
        display: none;
    }
    
    .availability-header h2 {
        font-size: 1.5rem;
    }
    
    .availability-icon {
        font-size: 2.5rem;
    }
    
    .selected-appointment-card {
        padding: 15px;
    }
    
    .appointment-detail {
        padding: 10px 0;
    }
}