/**
 * ESTILOS DEL FRONTEND - BARBER BOOKING (COMPACTO)
 * Diseño optimizado para menos scroll
 */

/* === CONTENEDOR PRINCIPAL === */
.barber-booking-wrapper {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.barber-booking-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

/* === HEADER COMPACTO === */
.barber-form-header-compact {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8ecef;
}

.barber-form-header-compact h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

/* === GRID DE 2 COLUMNAS === */
.barber-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.barber-form-column {
    min-height: 200px;
}

/* === SECCIONES COMPACTAS === */
.barber-form-section-compact {
    margin-bottom: 20px;
}

.barber-section-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === SERVICIOS COMPACTOS - GRID 2x2 === */
.barber-services-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.barber-service-option {
    display: block;
    position: relative;
    padding: 12px 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 90px;
}

.barber-service-option:hover {
    border-color: #3498db;
    background: #ecf6fd;
}

/* Ocultar el radio button */
.barber-service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Cuando está seleccionado */
.barber-service-option input[type="radio"]:checked ~ .service-label {
    color: white;
}

.barber-service-option input[type="radio"]:checked ~ .service-label strong {
    color: white;
}

.barber-service-option input[type="radio"]:checked ~ .service-label small {
    color: rgba(255, 255, 255, 0.9);
}

.barber-service-option input[type="radio"]:checked {
    & ~ .service-label {
        color: white;
    }
}

/* Fondo azul cuando está seleccionado (fallback para navegadores viejos) */
.barber-service-option.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.barber-service-option.selected .service-label strong,
.barber-service-option.selected .service-label small {
    color: white;
}

.service-label {
    display: block;
    width: 100%;
}

.service-label strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 4px;
}

.service-label small {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    margin: 2px 0;
}

/* === FECHA Y HORA === */
.barber-datetime-row {
    margin-bottom: 10px;
}

.barber-date-input {
    width: 100%;
}

/* === INPUTS COMPACTOS === */
.barber-input-compact {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.barber-input-compact:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.barber-input-group {
    margin-bottom: 12px;
}

/* === SLOTS DE TIEMPO COMPACTOS === */
.barber-time-slots-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.time-slot-btn {
    padding: 8px 6px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot-btn:hover {
    border-color: #3498db;
    background: #ecf6fd;
}

.time-slot-btn.selected {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* === RESUMEN COMPACTO === */
.barber-summary-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.summary-header {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span {
    opacity: 0.9;
}

.summary-item strong {
    font-weight: 600;
}

/* === BOTÓN COMPACTO === */
.barber-form-actions-compact {
    text-align: center;
    padding-top: 15px;
    border-top: 2px solid #e8ecef;
}

.barber-btn-compact {
    padding: 14px 50px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.barber-btn-compact:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.barber-btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === MENSAJES === */
.barber-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.barber-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.barber-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.barber-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .barber-booking-form-container {
        padding: 20px;
    }
    
    .barber-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .barber-time-slots-compact {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .barber-btn-compact {
        width: 100%;
        padding: 14px 20px;
    }
}

/* === DASHBOARD (mantener estilos anteriores) === */
.barber-dashboard-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.barber-dashboard-header {
    margin-bottom: 30px;
}

.barber-dashboard-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.barber-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.barber-stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    color: #3498db;
    margin: 0;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

.barber-calendar-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* === MODAL === */
.barber-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.barber-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.barber-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.barber-modal-close:hover {
    color: #000;
}

.barber-modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.barber-btn-success {
    background-color: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.barber-btn-warning {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.barber-btn-secondary {
    background-color: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Estados y tablas (mantener) */
.barber-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.barber-table thead {
    background: #34495e;
    color: white;
}

.barber-table th,
.barber-table td {
    padding: 15px;
    text-align: left;
}

.barber-table tbody tr:hover {
    background: #f8f9fa;
}

.barber-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.barber-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.barber-status-badge.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.barber-status-badge.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.barber-status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.barber-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 18px;
}

.barber-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.barber-booking-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* === HEADER DEL FORMULARIO === */
.barber-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.barber-form-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.barber-form-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* === MENSAJES === */
.barber-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 15px;
}

.barber-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.barber-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.barber-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* === SECCIONES DEL FORMULARIO === */
.barber-form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.barber-form-section h3 {
    font-size: 20px;
    color: #34495e;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* === GRID DE SERVICIOS === */
.barber-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.barber-service-card {
    position: relative;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.barber-service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.service-card-content {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.barber-service-card:hover .service-card-content {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-3px);
}

.barber-service-card input[type="radio"]:checked + .service-card-content {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.service-card-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.service-card-content .service-duration,
.service-card-content .service-price {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.9;
}

.service-card-content .service-description {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.8;
}

/* === CAMPOS DEL FORMULARIO === */
.barber-form-row {
    margin-bottom: 20px;
}

.barber-form-group {
    width: 100%;
}

.barber-form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.barber-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.barber-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* === SLOTS DE TIEMPO === */
.barber-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot-btn {
    padding: 12px 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot-btn:hover {
    border-color: #3498db;
    background: #ecf6fd;
}

.time-slot-btn.selected {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.time-slot-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === RESUMEN === */
.barber-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 25px;
}

.barber-summary h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.summary-content p {
    margin: 8px 0;
    font-size: 15px;
}

/* === BOTONES === */
.barber-form-actions {
    text-align: center;
    margin-top: 30px;
}

.barber-btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.barber-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.barber-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.barber-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === DASHBOARD === */
.barber-dashboard-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.barber-dashboard-header {
    margin-bottom: 30px;
}

.barber-dashboard-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.barber-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.barber-stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    color: #3498db;
    margin: 0;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

.barber-calendar-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* === MODAL === */
.barber-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.barber-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.barber-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.barber-modal-close:hover {
    color: #000;
}

.barber-modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.barber-btn-success {
    background-color: #27ae60;
    color: white;
}

.barber-btn-warning {
    background-color: #e74c3c;
    color: white;
}

.barber-btn-secondary {
    background-color: #95a5a6;
    color: white;
}

/* === TABLA === */
.barber-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.barber-table thead {
    background: #34495e;
    color: white;
}

.barber-table th,
.barber-table td {
    padding: 15px;
    text-align: left;
}

.barber-table tbody tr:hover {
    background: #f8f9fa;
}

.barber-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.barber-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.barber-status-badge.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.barber-status-badge.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.barber-status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .barber-booking-form-container {
        padding: 25px;
    }
    
    .barber-services-grid {
        grid-template-columns: 1fr;
    }
    
    .barber-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .barber-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

/* === LOADING === */
#loading-slots {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #7f8c8d;
}

.barber-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 18px;
}

/* === ERROR STATE === */
.barber-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}