/* -------- DÍAS Y HORARIOS -------- */
.pn-working-days-section {
    margin-top: 25px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

/* -------- SWITCH -------- */
.pn-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.pn-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pn-slider {
    position: absolute;
    cursor: pointer;
    background-color: grey;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .3s;
}

.pn-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

.pn-switch input:checked + .pn-slider {
    background-color: #00b800;
}

.pn-switch input:checked + .pn-slider:before {
    transform: translateX(22px);
}

/* -------- LAYOUT -------- */

.pn-day-row {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.pn-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.pn-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    flex-wrap: nowrap;
}

.pn-range-row input {
    border-radius: 10px;
}

.pn-day-name {
    font-size: 16px;
    width: 80px;
}

.pn-add-range {
    font-size: 24px!important;
    color: black!important;
    padding: 3px!important;
    font-family: "Poppins", sans-serif!important;
}

.pn-remove-range {
    background: transparent;
    border: none!important;
    cursor: pointer;
    font-size: 18px;
}

input[type="time"] {
    padding: 5px;
    width: 120px;
}

/* -------- ERRORES -------- */

.pn-error {
    border: 1px solid #ff4d4d !important;
    padding: 10px;
    border-radius: 6px;
}

.pn-error-msg {
    background: #ff4d4d;
    color: white;
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* -------- DAYS OFF (existing) -------- */

.pn-days-off-section {
    margin-top: 25px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
}

.pn-day-off-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dedede;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pn-day-off-row > span {
    margin: 0 8px;
}

.pn-dayoff-dates-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-dayoff-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-dayoff-name-row .pn-dayoff-name {
    flex: 1;
}

.pn-day-off-row input[type="date"] {
    flex: 1;
}

.pn-dayoff-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* -------- WORKING DAYS -------- */

.pn-special-days-section {
    margin-top: 25px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.pn-special-day-row {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.pn-special-day-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.pn-special-day-top > span {
    margin: 0 8px;
}

.pn-working-dates-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-working-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-working-name-row .pn-special-name {
    flex: 1;
}

.pn-special-day-top input[type="date"] {
    flex: 1;
}

.pn-special-name {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
}

.pn-working-schedule-wrapper {
    padding-left: 4px;
}

.pn-working-schedule-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pn-working-schedule-row input[type="time"] {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    width: 110px;
}

.pn-add-working-schedule,
.pn-add-working-day,
.pn-add-dayoff,
.pn-add-range {
    background: #000;
    color: black!important;
    padding: 6px 10px;
    border: none!important;
    border-radius: 6px;
    cursor: pointer;
}

.pn-add-working-schedule:hover,
.pn-add-working-day:hover,
.pn-add-dayoff:hover,
.pn-add-range:hover {
    background-color: transparent!important;
    color: black!important;
}

.pn-remove-working-day,
.pn-remove-working-schedule,
.pn-remove-dayoff,
.pn-remove-range {
    background: transparent;
    border: none!important;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pn-remove-working-day:focus,
.pn-remove-working-schedule:focus,
.pn-remove-dayoff:focus,
.pn-remove-range:focus {
    outline: none;
    box-shadow: none;
}

.pn-remove-working-day svg,
.pn-remove-working-schedule svg,
.pn-remove-dayoff svg,
.pn-remove-range svg {
    width: 16px;
    height: 16px;
    fill: black;
    transition: fill 0.2s ease;
}

.pn-remove-working-day:hover svg,
.pn-remove-working-schedule:hover svg,
.pn-remove-dayoff:hover svg,
.pn-remove-range:hover svg {
    fill: black;
}


/* -------- ANTICIPACION MINIMA -------- */

.pn-anticipacion-minima-section {
    margin-top: 25px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.pn-anticipacion-minima-section select {
    width: fit-content;
}


/* -------- ANTICIPACION MAXIMA -------- */

.pn-anticipacion-maxima-section {
    margin-top: 25px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.pn-anticipacion-maxima-section select {
    width: fit-content;
}

/* -------- INTERVALO DE RESERVA -------- */

.pn-intervalo-section {
    margin-top: 25px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.pn-intervalo-section select {
    width: fit-content;
}


/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media screen and (max-width: 768px) {
    
    /* Días y horarios semanales */
    .pn-day-row {
        flex-direction: column;
        gap: 0px;
    }

    .pn-day-header {
        width: 100%;
    }

    .pn-day-ranges {
        width: 100%;
    }

    /* Rangos horarios - inputs verticales */
    .pn-range-row {
        flex-direction: row;
        align-items: flex-start;
        background: #f9f9f9;
        border-radius: 8px;
        position: relative;
    }

    .pn-range-row input[type="time"] {
        width: 100%;
        max-width: 200px;
    }

    .pn-range-row .pn-remove-range {
        top: 10px;
        right: 10px;
    }

    /* Días inhabilitados */
    .pn-dayoff-dates-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    .pn-dayoff-dates-row span {
        display: none;
    }

    .pn-dayoff-name-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .pn-dayoff-name-row .pn-dayoff-name {
        width: 100%;
    }

    .pn-dayoff-name-row .pn-remove-dayoff {
        align-self: flex-end;
    }

    /* Días con horario especial */
    .pn-working-dates-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    .pn-working-dates-row span {
        display: none;
    }

    .pn-day-off-row input[type="date"] {
        width: 50%!important;
    }

    .pn-working-dates-row input[type="date"] {
        width: 50%!important;
    }

    .pn-working-name-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .pn-working-name-row .pn-special-name {
        width: 100%;
    }

    .pn-working-name-row .pn-remove-working-day {
        align-self: flex-end;
    }

    /* Horarios especiales dentro de working days */
    .pn-working-schedule-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
        background: #f9f9f9;
        border-radius: 8px;
        position: relative;
    }

    .pn-working-schedule-row input[type="time"] {
        width: 100%;
        max-width: 200px;
    }


    /* Botones y selects */
    .pn-anticipacion-minima-section select,
    .pn-anticipacion-maxima-section select,
    .pn-intervalo-section select {
        width: 100%;
        max-width: 250px;
    }

    /* Espaciado general */
    .pn-working-days-section,
    .pn-days-off-section,
    .pn-special-days-section,
    .pn-anticipacion-minima-section,
    .pn-anticipacion-maxima-section,
    .pn-intervalo-section {
        padding: 15px;
    }

    /* Textos de ayuda */
    .pn-help {
        font-size: 14px;
    }

    /* Botón de submit */
    .button.button-primary {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}