/* ==========================================================================
   Estilos para Buscador de Noticias - Noticias.css
   ========================================================================== */

/* Contenedor principal */
.container {
    margin-top: 20px;
}

/* Panel de búsqueda */
.panel-search {
    border-color: #337ab7;
    margin-bottom: 20px;
}

.panel-search > .panel-heading {
    color: #fff;
    background-color: #337ab7;
    border-color: #337ab7;
}

.panel-search .panel-title {
    font-size: 1.2em;
    font-weight: 500;
}

.panel-search .panel-title i {
    margin-right: 8px;
}

.panel-search .form-group {
    margin-bottom: 15px;
}

.panel-search .control-label {
    font-weight: 600;
    color: #555;
}

.panel-search .input-group {
    width: 100%;
}

.panel-search .input-group-addon {
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

/* Panel de resultados */
.panel-results {
    border-color: #ddd;
}

.panel-results > .panel-heading {
    color: #333;
    background-color: #f5f5f5;
    border-color: #ddd;
    padding: 10px 15px;
}

.panel-results .panel-title {
    font-size: 1.1em;
    font-weight: 500;
}

.panel-results .panel-title i {
    margin-right: 8px;
}

.result-count {
    color: #777;
    font-size: 0.9em;
    font-weight: normal;
}

/* Tablas */
.news-table {
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.news-table thead {
    background-color: #f8f8f8;
}

.news-table thead th {
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    padding: 12px 8px;
}

.news-table tbody tr:hover {
    background-color: #f5f5f5;
}

.news-table td {
    vertical-align: middle;
    padding: 10px 8px;
}

/* Enlaces de noticias */
.news-link {
    color: #337ab7;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.news-link:hover {
    color: #23527c;
    text-decoration: underline;
}

.news-link i {
    margin-right: 5px;
    color: #777;
}

/* Fechas */
.news-date {
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.news-date i {
    margin-right: 5px;
    font-size: 0.9em;
}

/* Mensajes sin resultados */
.no-results {
    text-align: center;
    padding: 30px;
    color: #777;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 1.1em;
}

.no-results i {
    font-size: 1.2em;
    margin-right: 8px;
    color: #999;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 20px;
    color: #337ab7;
}

.loading i {
    font-size: 1.5em;
    margin-right: 8px;
}

/* Botones */
.btn-search,.btn-reset,.btn-new {
    margin: 0 5px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    min-height: 42px !important;
    height: 42px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important; /* ← ¡AGREGA ESTO! */
}

.btn-search {
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btn-search:hover {
    background-color: #54abf7;
    border-color: #102d46;
}

.btn-reset {
    background-color: #777;
    border-color: #666;
    color: white;
}

.btn-reset:hover {
    background-color: #ff8800;
    border-color: #444;
}

.btn-new {
    background-color: #16bb7c !important;
    border-color: #16c56d !important;
    color: white !important;
}

.btn-new:hover {
    background-color: #43e96c !important;
    border-color: #0b6438 !important;
}

/* Íconos dentro de botones */
.btn-search i, .btn-reset i, .btn-new i {
    margin-right: 5px;
    line-height: 1;
    vertical-align: middle;
}

/* Paginación */
.pagination-container {
    text-align: center;
    margin: 20px 0;
}

.pagination {
    margin: 0;
    display: inline-flex;
    padding-left: 0;
    border-radius: 4px;
}

.pagination > li {
    display: inline;
}

.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > span:focus {
    z-index: 2;
    color: #23527c;
    background-color: #eee;
    border-color: #ddd;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: #337ab7;
    border-color: #337ab7;
}

.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
    color: #777;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin-top: 10px;
        padding: 0 10px;
    }
    
    .panel-search .control-label {
        text-align: left !important;
        margin-bottom: 5px;
    }
    
    .panel-search .form-group {
        margin-bottom: 10px;
    }
    
    .btn-search, .btn-reset {
        width: 100%;
        margin: 5px 0;
    }
    
    .news-table th,
    .news-table td {
        font-size: 0.9em;
        padding: 8px 5px;
    }
    
    .pagination > li > a,
    .pagination > li > span {
        padding: 4px 8px;
        font-size: 0.9em;
    }
    
    .result-count {
        display: block;
        text-align: center;
        margin-top: 5px;
    }
}

/* Focus states */
.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}