/* FORMULARIO AGENDA AL FINAL */
.gap { /*Helper para campos puestos en divs de columnas*/
    gap: 10px;
}

form {
    margin: 0;
}

.portal {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('/fondos/fondo0.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.contenido {
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.contenido > img {
    width: 50%;
}

.formulario-flotante {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: end;
    box-sizing: border-box;
    background: #f1f3f5;
    backdrop-filter: none;
    padding: 20px;
    border: 1px solid #d5dde3;
    border-top: 4px solid #1cd3c6;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(30, 54, 71, .16);
    gap: 16px;
}

.ff-tablero {
    min-height: 95%;
    width: 95%;
    box-sizing: border-box;
    background: var(--blanco);
    padding: 20px;
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    border: 1px solid #e0e6ea;
    border-radius: 10px;
}

.ff-interior {
    position: fixed;
    z-index: 1000;
    width: 760px;
    top: 50%;
    left: 50%;
    background: #f1f3f5;
    transform: translate(-50%,-50%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Unifica flotantes antiguos que aún declaran fondo y bordes en el atributo style. */
.formulario-flotante.ff-interior {
    background: #f1f3f5 !important;
    border: 1px solid #d5dde3 !important;
    border-top: 4px solid #1cd3c6 !important;
    box-shadow: 0 12px 30px rgba(30, 54, 71, .16);
}

.ff-interior .filaGeneral__seccion {
    padding: 3px 5px;
    border-radius: 3px;
}

.ff-fondo {
    width: 900px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #d5dde3;
    border-radius: 10px;
}


.formulario-flotante  h3,
.formulario-flotante  h4 {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    color: var(--dcodeAzul);
    font: var(--fuentePpal);
    font-size: 20px;
    font-weight: bold;
}

.formulario-flotante > h4 {
    font-size: 15px;
    margin-bottom: 10px;
}


.ff-interior h3 {
    font-size: 25px;
    color: var(--dcodeAzul);
}

/* Modal estándar opcional: encabezado y contenido separados, sin transparencia. */
.ff-modal {
    align-items: stretch;
    gap: 12px;
    max-height: calc(100vh - 32px);
    padding: 20px;
    background: #f1f3f5;
    backdrop-filter: none;
    border: 1px solid #d5dde3;
    border-top: 4px solid #1cd3c6;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(30, 54, 71, .16);
}

.ff-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ff-modal__header h3,
.formulario-flotante .ff-modal__header h3 {
    flex: 1;
    width: auto;
    margin: 0;
    color: var(--negro);
    font-size: 16px;
    text-align: center;
}

.ff-modal__cerrar {
    display: flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
}

.ff-modal__cerrar img {
    display: block;
    cursor: pointer;
}

.ff-modal__card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 18px;
    background: var(--blanco);
    border: 1px solid #e0e6ea;
    border-radius: 10px;
}

.ff-contenedor {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    background: #ffffff;
    border: 1px solid #d6e0e6;
    border-radius: 8px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 12px;
    padding: 6px;
    box-shadow: 0 1px 1px rgba(30, 54, 71, .03);
}

.ff-contenedor--readonly {
    background-color: rgb(250, 241, 187);
}

.ff-contenedor label {
    color: #425466;
    font-weight: bold;
    font-size: 12px;
    padding-left: 2px;
}

.formularioFL-img {
    height: 90px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.formularioFL-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.formularioFL-campo {
    width: 100%;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    font-style: italic;
    color: var(--dcodeAzul);
}

.FLcampo-input {
    box-sizing: border-box;
    background: #fbfcfd;
    border: 1px solid #b9cbd4;
    border-radius: 5px;
    padding: 6px;
    font-size: 16px;
}

.ff-contenedor input,
.ff-contenedor select,
.ff-contenedor textarea {
    box-sizing: border-box;
    background: #fbfcfd;
    border: 1px solid #b9cbd4;
    border-radius: 5px;
    padding: 6px 7px;
    margin-top: 0;
    font-size: 15px;
}

.FLcampo-input:focus,
.ff-contenedor input:focus,
.ff-contenedor select:focus,
.ff-contenedor textarea:focus {
    outline: 2px solid rgba(28, 211, 198, .28);
    outline-offset: 1px;
    border-color: #168f9a;
    background: #ffffff;
}

.ff-contenedor input,
.ff-contenedor select,
.ff-contenedor textarea {
    width: 100%;
}

.formularioFL-campo > label {
    text-align: center;
    color: #ffffff;
}

.ff-fila {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: end;
}

.ff-fila > img {
    cursor: pointer;
}

/* Cierre compacto y reutilizable para formularios flotantes. */
.ff-cerrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.ff-cerrar:hover { background: #333333; }

.ff-cerrar:focus-visible {
    outline: 3px solid rgba(28, 211, 198, .42);
    outline-offset: 2px;
}

.acciones {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition-property: background-color, font-weight, text-style;
    transition-duration: 0.3ms;
}

.acciones > a {
    color: var(--dcodeAzul);
    font-size: small;
}

.acciones > a:hover {
    /* color: #012a50; */
    font-weight: bold;
    font-style: italic;
}

/* FORMULARIOS AGENDA */
.agenda__editar h3 {
    font-size: 25px;
    color: var(--dcodeAzul);
    text-align: center;
    font-weight: bold;
}

.agenda__formulario {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formulario__campo--agenda {
    background-color: unset;
    gap: 5px;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.formulario__campo--agenda label {
    color: var(--dcodeAzul);
    font-size: 18px;
    font-weight: bold;
}

.formulario__campo--agenda input,
.formulario__campo--agenda textarea {
    all: unset;
    width: 100%;  /* Asegura que ocupe el 100% del ancho disponible */
}

.formulario__campo--agenda textarea {
    min-height: 150px; /* Altura mínima para la textarea */
    flex-grow: 1; /* Hace que la textarea crezca para llenar el espacio disponible */
    resize: vertical; /* Permite que el usuario ajuste la altura de la textarea */
    box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
}

.formulario__campo--agenda select {
    background-color: unset;
    border: none;
}

.agenda__formulario input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.agenda__formulario input[type="submit"] {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--dcodeAzul);
    border: none;
    color: var(--blanco);
    font-size: 20px;
    font-weight: regular;
    padding: 10px 20px;
    border-radius: 2.5px;
    cursor: pointer;
    transition: background-color 0.3s, font-weight 0.3s;
}

.agenda__formulario input[type="submit"]:hover {
    background-color: #0f3e6e;
    font-weight: bold;
}
