.hidden {
    display: none !important;
}

/* Estilos para la sección principal */
main {
    padding: 20px;
    flex: 1;
}

/* Sección de acceso restringido */
.access-restricted {
    text-align: center;
    padding: 50px;
    background-color: #333333;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgb(250, 248, 248); /* Sombra refinada */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.access-restricted:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgb(250, 248, 248); /* Sombra refinada */
}

.access-restricted h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fafbfc;
}

.access-restricted .cta-button {
    margin: 10px;
    background-color: #457b9d;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.access-restricted .cta-button:hover {
    background-color: #1d3557;
    transform: scale(1.1);
}

.input-error {
    border: 2px solid red;
    background-color: #ffe6e6;
}

.today-routine {
    border: 3px solid transparent; /* Borde transparente por defecto */
    background-color: rgba(51, 51, 51, 0.4); /* Fondo tenue gris oscuro */
    box-shadow: 0 4px 15px rgba(51, 51, 51, 0.3); /* Sombra gris moderada */
    transform: scale(1.05); /* Efecto de agrandamiento ligero */
    animation: highlight 1.5s ease-in-out 3; /* La animación se repite 3 veces */
    position: relative;
}

.today-routine .exercise-list li:hover {
    background-color: rgba(51, 51, 51, 0.4); /* Gris oscuro translúcido */
    transition: background-color 0.3s, transform 0.2s;
}

.today-routine::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #333333, #888888); /* Degradado de gris oscuro a gris claro */
    border-radius: 5px;
    z-index: -1;
}

@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.required {
    color: red;
    font-weight: bold;
}

.error-message {
    color: rgb(255, 255, 255);
    font-size: 0.9em;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    z-index: 999; /* Aparece por encima de otros elementos */
    display: none; /* Oculto por defecto */
}

#overlay.active {
    display: block; /* Mostrar cuando está activo */
}

#edit-popup {
    z-index: 1000; /* Popup encima del overlay */
}

/* Botón de descarga PDF */
#download-pdf {
    position: absolute;
    top: 183px;
    right: 20px;
    background: #f8f8f8;
    border: 2px solid #388E3C;
    border-radius: 7px;
    padding: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

#download-pdf:hover {
    transform: scale(1.1);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
}

#download-pdf img {
    width: 40px;
    height: 40px;
}

#routine-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
}

/* Estilo para las viñetas modernas */
.exercise-list {
    list-style-type: none; /* Elimina las viñetas tradicionales */
    padding: 0;
    margin: 0;
}

.exercise-list li {
    position: relative;
    padding-left: 30px; /* Espacio para la viñeta */
    margin-bottom: 10px; /* Espacio entre los elementos */
    font-size: 1rem; /* Ajusta el tamaño del texto */
    line-height: 1.5; /* Altura de la línea para mejorar la legibilidad */
    color: #374151; /* Color del texto */
}

/* Estilo para la viñeta moderna */
.exercise-list li::before {
    content: "";
    position: absolute;
    left: 10px; /* Posición de la viñeta */
    top: 50%;
    transform: translateY(-50%); /* Centra verticalmente */
    width: 10px; /* Tamaño de la viñeta */
    height: 10px; /* Tamaño de la viñeta */
    border-radius: 50%; /* Forma circular */
    background-color: #10b981; /* Color verde, puedes cambiarlo */
}

/* Agregar un hover para los elementos */
.exercise-list li:hover {
    background-color: rgba(51, 51, 51, 0.4); /* Fondo tenue gris oscuro */
    border-radius: 5px;
    padding-left: 35px; /* Espacio extra cuando se pasa el ratón */
}

/* Tarjetas de rutina */
.routine-card {
    background-color: #333333;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgb(250, 248, 248); /* Sombra refinada */
    padding: 20px;
    border: 1px solid #ccc;
    margin: 10px 0;
}

.routine-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgb(250, 248, 248); /* Sombra refinada */
}

.routine-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fafbfc;
    margin-bottom: 10px;
}

.routine-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.routine-card li {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #f8f9fc;
}

/* Agregar la clase 'exercise-list' dentro de tus tarjetas para aplicar el estilo */
.routine-card ul.exercise-list {
    padding-left: 0;
}

.routine-card p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.routine-card .cta-button {
    background-color: #10b981;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.routine-card .cta-button:hover {
    background-color: #059669;
}

/* Popup de edición */
#edit-popup {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333333;
    padding: 30px;
    border-radius: 16px;
    z-index: 1000;
    width: 95%;
    max-width: 500px;
    max-height: 97vh;
    animation: popup-show 0.3s ease-in-out;
    border: 2px solid #3b82f6;
}

/* Fondo semi-transparente al abrir el popup */
#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Contenedor principal del modal */
.swal2-popup {
    background-color: #333333;
    border: 1px solid #e0e0e0;
}

/* Título del modal */
.swal2-title {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
}

.swal-text {
    color: white !important;
}

/* Selector y campos de edición */
#edit-popup select,
#edit-popup input[type="text"],
#edit-popup input[type="number"],
#popup-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd; /* Bordes suaves */
    border-radius: 8px; /* Bordes redondeados */
    padding: 10px; /* Ajusta el espaciado interno */
    transition: box-shadow 0.3s, border-color 0.3s; /* Efectos suaves al interactuar */
}

#edit-popup select:focus,
#edit-popup input:focus,
#popup-content textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    outline: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Sombra más intensa al interactuar */
    border-color: #007BFF; /* Cambia el color del borde al interactuar */
    outline: none; /* Elimina el borde azul predeterminado del navegador */
}

/* Botones del popup */
#edit-popup button {
    display: inline-block;
    padding: 12px 20px;
    margin: 10px 5px 0;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#edit-popup .save-button {
    background-color: #3b82f6;
    color: #ffffff;
    border: 2px solid #2563eb;
}

#edit-popup .save-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

#edit-popup .delete-button {
    background-color: #ef4444;
    color: #ffffff;
    border: 2px solid #dc2626;
}

#edit-popup .delete-button:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

#edit-popup .close-button {
    background-color: #9ca3af;
    color: #ffffff;
    border: 2px solid #6b7280;
}

#edit-popup .close-button:hover {
    background-color: #6b7280;
    transform: translateY(-2px);
}

/* Animación del popup */
@keyframes popup-show {
    from {
        scale: 0.9;
        opacity: 0;
    }
    to {
        scale: 1;
        opacity: 1;
    }
}

#popup-content h3 {
    font-size: 1.8rem;
    color: #f0f2f5;
    margin-bottom: 10px;
}

#popup-content p {
    font-size: 1rem;
    color: #f7f9fc;
    margin-bottom: 20px;
}

/* Botón "Cancelar" centrado debajo */
#close-popup {
    display: block;
    margin: 20px auto 0; /* Centrado con margen superior */
    background-color: #e74c3c;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, transform 0.3s;
}

#close-popup:hover {
    background-color: #6b7280;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Botones en las tarjetas */
.routine-card .edit-button,
.routine-card .delete-button {
    padding: 10px 15px; /* Tamaño ajustado para mayor comodidad */
    margin-top: 12px;
    border: none;
    border-radius: 10px; /* Bordes más redondeados */
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.routine-card .edit-button {
    background-color: #457b9d;
    color: #ffffff;
}

.routine-card .edit-button:hover {
    background-color: #356485; /* Color más oscuro al pasar el mouse */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.routine-card .delete-button {
    background-color: #e74c3c;
    color: #ffffff;
}

.routine-card .delete-button:hover {
    background-color: #b3392b; /* Ajuste para mejor cohesión */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Lista de rutinas */
.routine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px; /* Espaciado más generoso */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Sombra más suave */
    transition: background-color 0.3s, transform 0.2s;
}

.routine-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.routine-item .edit-button {
    margin-left: 12px; /* Espaciado ajustado */
}

/* Botones distribuidos horizontalmente */
#popup-content .button-container {
    display: flex;
    justify-content: space-evenly; /* Mejor distribución */
    margin-top: 20px;
    gap: 10px;
}

/* Botón "Eliminar" a la izquierda */
#delete-exercise {
    background-color: #1d3557;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

#delete-exercise:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.exercise-item {
    cursor: pointer; /* Cambia el cursor a puntero cuando se pasa por encima */
}

.exercise-item:hover {
    text-decoration: underline; /* Agrega un subrayado cuando el usuario pasa el mouse */
    color: #007bff; /* Cambia el color al pasar el mouse (puedes ajustarlo) */
}

.instructions-text {
    color: white;
    text-align: left;
    display: block; /* para que el texto ocupe el ancho completo y el alineado funcione bien */
}

/* Botón "Guardar" a la derecha */
#save-changes {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

#save-changes:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Botón "Cancelar" centrado */
#popup-content .centered-button {
    display: block;
    margin: 20px auto 0;
    padding: 12px 25px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 12px; /* Bordes más redondeados */
    font-size: 1.1rem; /* Tamaño de texto ligeramente mayor */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    text-align: center;
}

#popup-content .centered-button:hover {
    background-color: #b3392b;
    transform: scale(1.05); /* Añadido efecto de escala */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra adicional */
}

/* Campo de texto "Información adicional" */
#popup-content textarea {
    width: 100%;
    height: 120px; /* Altura ligeramente aumentada */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px; /* Bordes más redondeados */
    font-size: 1rem;
    background-color: #f9fafb;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: "Arial", sans-serif;
    font-size: 1rem;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra más visible */
    border: 1px solid #ddd; /* Bordes suaves */
    border-radius: 8px; /* Bordes redondeados */
    padding: 10px; /* Ajusta el espaciado interno */
    transition: box-shadow 0.3s, border-color 0.3s; /* Efectos suaves al interactuar */
}

/* Edit Fields */
#edit-fields-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Responsive */
@media screen and (max-width: 776px) {
    #routine-list {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    #download-pdf {
        top: 45%;
    }

    #download-pdf img {
        width: 35px;  /* Tamaño del icono más pequeño */
        height: 35px; /* Tamaño del icono más pequeño */
    }
}

@media screen and (max-width: 480px) {
    #routine-list {
        grid-template-columns: 1fr;
    }

    #download-pdf {
        top: 45%;
    }

    #download-pdf img {
        width: 35px;  /* Tamaño del icono más pequeño */
        height: 35px; /* Tamaño del icono más pequeño */
    }

}

/* Media query para pantallas pequeñas (móviles) */
@media (max-width: 600px) {
    #download-pdf {
        top: 45%;
    }

    #download-pdf img {
        width: 35px;  /* Tamaño del icono más pequeño */
        height: 35px; /* Tamaño del icono más pequeño */
    }

}