/* =====================================
   PÁGINA BARBEROS
===================================== */

.barberos-page,
.barbero-form-page,
.barbero-editar-page {

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

}


/* =====================================
   CABECERAS
===================================== */

.barberos-header,
.barbero-form-header,
.barbero-editar-header {

    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    text-align: center;

}


.barberos-titulo,
.barbero-form-header h2,
.barbero-editar-titulo {

    margin: 0;
    color: #1e293b;
    font-size: 22px;

}


/* =====================================
   BOTONES SUPERIORES
===================================== */

.barberos-acciones-superior {

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;

}


/* =====================================
   GRID DE BARBEROS
===================================== */

.barberos-grid {

    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 8px 0 20px;
    box-sizing: border-box;

}


/* =====================================
   TARJETA BARBERO
===================================== */

.barbero-item {

    position: relative;
    min-height: 160px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, #f3f6fb);
    border: 1px solid rgba(37, 99, 235, .10);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, .07),
        0 3px 8px rgba(37, 99, 235, .05);
    transition: .25s ease;

}


.barbero-item::before {

    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    top: -50px;
    right: -40px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .08);
    transition: .35s ease;

}


.barbero-item:hover {

    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, .12),
        0 6px 15px rgba(37, 99, 235, .10);

}


.barbero-item:hover::before {

    transform: scale(1.5);

}


.barbero-item > * {

    position: relative;
    z-index: 1;

}


.barbero-item h3 {

    margin: 0 0 10px;
    font-size: 19px;
    color: #1e293b;

}


/* =====================================
   VER INFORMACIÓN
===================================== */

.barbero-ver {

    display: inline-block;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: rgba(37, 99, 235, .10);
    transition: .25s ease;

}


.barbero-item:hover .barbero-ver {

    color: #fff;
    background: #2563eb;

}


/* =====================================
   MODAL
===================================== */

.barbero-modal {

    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(5px);

}


.barbero-modal.activo {

    display: flex;

}


.barbero-modal-contenido {

    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .25);

}


.barbero-modal-contenido h2 {

    margin: 0 0 18px;
    text-align: center;
    color: #1e293b;

}


.barbero-modal-cerrar {

    position: absolute;
    top: 12px;
    right: 15px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    cursor: pointer;
    transition: .2s ease;

}


.barbero-modal-cerrar:hover {

    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);

}


/* =====================================
   INFORMACIÓN DEL BARBERO
===================================== */

.barbero-info p {

    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #555;
    overflow-wrap: break-word;

}


/* =====================================
   ACCIONES DEL MODAL
===================================== */

.barbero-acciones {

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;

}


/* =====================================
   FORMULARIO NUEVO / EDITAR
===================================== */

.barbero-form-page form,
.barbero-editar-form {

    width: 100%;
    max-width: 900px;
    margin: 0 auto;

}


/* =====================================
   TARJETAS DEL FORMULARIO
===================================== */

.barbero-form-page .card,
.barbero-editar-card {

    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    margin-bottom: 10px;

}


.barbero-form-page .card h3,
.barbero-editar-card h3 {

    margin: 0 0 9px;
    font-size: 16px;
    color: #1e293b;

}


/* =====================================
   CAMPOS
===================================== */

.barbero-form-page .input,
.barbero-editar-input {

    width: 100%;
    box-sizing: border-box;
    min-height: 36px;
    margin-bottom: 6px;
    padding: 7px 10px;
    font-size: 14px;

}


.barbero-form-page .card .input:last-child,
.barbero-editar-card .barbero-editar-input:last-child {

    margin-bottom: 0;

}


/* =====================================
   SERVICIOS
===================================== */

.barbero-form-page #servicios_container,
.barbero-servicios-grid {

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;

}


.barbero-form-page .servicio-card,
.barbero-servicio-card {

    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 7px 9px;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;

}


.barbero-form-page .servicio-card:hover,
.barbero-servicio-card:hover {

    border-color: #2563eb;
    background: #eff6ff;

}


.barbero-servicio-card span {

    color: #334155;
    font-size: 13px;
    font-weight: 600;

}


/* =====================================
   ACCIONES DEL FORMULARIO
===================================== */

.barbero-form-page .acciones,
.barbero-editar-acciones {

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-bottom: 15px;

}


/* =====================================
   MENSAJE DE ERROR
===================================== */

.barbero-editar-error {

    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;

}


.barbero-editar-error p {

    margin: 0;
    color: #dc2626;
    font-weight: 600;

}


/* =====================================
   TABLET
===================================== */

@media (max-width: 1100px) {

    .barberos-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;

    }


    .barbero-form-page #servicios_container,
    .barbero-servicios-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }

}


/* =====================================
   MÓVIL
===================================== */

@media (max-width: 768px) {

    /* BARBEROS */

    .barberos-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;

    }


    .barbero-item {

        min-height: 145px;
        padding: 16px 10px;

    }


    .barbero-item h3 {

        font-size: 16px;

    }


    .barbero-ver {

        padding: 6px 10px;
        font-size: 11px;

    }


    /* CABECERA */

    .barbero-form-header,
    .barbero-editar-header {

        gap: 5px;
        margin-bottom: 9px;

    }


    .barbero-form-header h2,
    .barbero-editar-titulo {

        font-size: 20px;

    }


    /* TARJETAS */

    .barbero-form-page .card,
    .barbero-editar-card {

        padding: 11px 12px;
        margin-bottom: 8px;
        border-radius: 13px;

    }


    .barbero-form-page .card h3,
    .barbero-editar-card h3 {

        margin-bottom: 7px;
        font-size: 15px;

    }


    /* INPUTS */

    .barbero-form-page .input,
    .barbero-editar-input {

        min-height: 34px;
        margin-bottom: 5px;
        padding: 6px 9px;
        font-size: 13px;

    }


    /* SERVICIOS */

    .barbero-form-page #servicios_container,
    .barbero-servicios-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;

    }


    .barbero-form-page .servicio-card,
    .barbero-servicio-card {

        min-height: 34px;
        padding: 5px 7px;
        gap: 5px;
        border-radius: 8px;

    }


    .barbero-form-page .servicio-card strong,
    .barbero-servicio-card span {

        font-size: 11px;

    }


    /* BOTONES */

    .barbero-form-page .acciones,
    .barbero-editar-acciones {

        gap: 6px;
        margin-top: 6px;
        padding-bottom: 8px;

    }


    .barbero-form-page .acciones .btn,
    .barbero-editar-acciones .btn {

        padding: 8px 12px;
        font-size: 12px;

    }


    /* MODAL */

    .barbero-modal-contenido {

        padding: 20px 16px;

    }


    .barbero-acciones {

        flex-direction: column;

    }


    .barbero-acciones .btn {

        width: 100%;
        text-align: center;

    }

}


/* =====================================
   MÓVIL PEQUEÑO
===================================== */

@media (max-width: 480px) {

    .barberos-grid {

        grid-template-columns: 1fr;

    }


    .barbero-form-page #servicios_container,
    .barbero-servicios-grid {

        grid-template-columns: 1fr;

    }

}
