﻿.ft-main-container {
    font-family: Arial, sans-serif;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

body > .ft-table-container,
body > .ft-search-container {
    width: 100%;
    margin: 0 auto;
}

.ft-table-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

.ft-table {
    width: 100%;
    color: #212529;
    border-collapse: collapse;
}

/* Aplica borde a la tabla, a las celdas de cabecera y de datos */
.ft-table,
.ft-th,
.ft-td {
    border: 1px solid #dee2e6;
}

.ft-th,
.ft-td {
    padding: 0.75rem;
    vertical-align: top;
}

/* Estilos para la fila de cabecera */
.ft-header-row .ft-th {
    vertical-align: bottom;
}

/* Hover para filas de datos */
.ft-data-row:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Estilos para el botón de acción */
.ft-btn {
    color: #fff;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

    .ft-btn:hover {
        background-color: #0069d9;
        border-color: #0062cc;
    }

/* Estilos para el modal */
.ft-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background-color: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 625px;
    width: 90%;
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    font-family: Arial, sans-serif;
}

    .ft-modal.active {
        display: block;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

.ft-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

    .ft-modal-backdrop.active {
        display: block;
        opacity: 1;
    }

.ft-plaza-cell {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
}

    .ft-plaza-cell:hover {
        color: #0056b3;
    }

.ft-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    font-size: 22px;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

    .ft-modal-close:hover {
        color: #333;
        background-color: #f0f0f0;
    }

.ft-modal-content {
    margin-top: 15px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 5px 10px;
}

/* Search styles */
.ft-search-container {
    position: relative;
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
}

.ft-search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: border-color 0.2s ease-in-out;
    box-sizing: border-box;
}

    .ft-search-input:focus {
        outline: none;
        border-color: #007bff;
    }

/* Estilos específicos para los inputs de búsqueda en las celdas */
.ft-search-cell {
    padding: 8px;
}

    .ft-search-cell .ft-search-input {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

/* Loading and empty state styles */
.ft-loading,
.ft-empty {
    text-align: center;
    padding: 20px !important;
    color: #6c757d;
}

.ft-loading {
    font-style: italic;
}

.ft-empty {
    background-color: #f8f9fa;
}

/* Pagination styles */
.ft-pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

.ft-page-btn {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

    .ft-page-btn.active,
    .ft-page-btn:hover {
        background-color: #007bff;
        color: #fff;
        border-color: #007bff;
    }

    .ft-page-btn:disabled {
        cursor: not-allowed;
        background-color: #e9ecef;
        border-color: #dee2e6;
    }

        .ft-page-btn:disabled:hover {
            background-color: #e9ecef;
            border-color: #dee2e6;
        }

.ft-modal-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 12px;
}

    .ft-modal-item > .ft-modal-title {
        font-weight: 700;
        color: #333;
        font-size: 1.05rem;
    }

/* Estilos específicos para la descripción */
.ft-modal-description {
    line-height: 1.6;
    color: #333;
    background-color: transparent;
    padding: 8px 0;
    border-radius: 0;
    border-left: none;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-line; /* Preserva los saltos de línea */
}

/* Estilo para el contenedor de la descripción */
.ft-description-container {
    margin-top: 5px;
}

/* Estilos para el enlace de aplicar en el modal */
.ft-modal-link {
    display: inline-block;
    color: #fff;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    margin-top: 15px;
    width: fit-content;
    font-weight: 500;
}

    .ft-modal-link:hover {
        background-color: #0069d9;
        border-color: #0062cc;
        text-decoration: none;
        color: #fff;
        transform: scale(1.03);
    }

/* Media queries para hacer la tabla responsive */
@media (min-width: 576px) {
    .ft-table-container,
    .ft-pagination {
        width: 95%;
    }
}

@media (min-width: 768px) {
    .ft-table-container,
    .ft-pagination {
        width: 90%;
    }
}

@media (min-width: 992px) {
    .ft-table-container,
    .ft-pagination {
        width: 85%;
    }
}
