.is-warning {
    border-color: #ffc107 !important;
    background-color: #fff8e6 !important;
}

#titulo-alert {
    font-size: 0.9em;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-radius: 0.25rem;
}

.libro-similar {
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.libro-similar:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

#titulo-alert hr {
    margin: 0.5rem 0;
    opacity: 0.2;
}

/* Estilos para el campo de búsqueda de editorial */
.loading {
    background-image: url('data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZGVyLmluZm8AIf8LTkVuYW1lAQASAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#editorial-suggestions {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

#editorial-suggestions .list-group-item {
    cursor: pointer;
}

#editorial-suggestions .list-group-item:hover {
    background-color: #f8f9fa;
}

.fila-actualizada {
    animation: highlightRow 1.5s ease;
}

/* Estilos para el sistema de calificaciones */
.rating-display {
    margin: 5px 0;
}

.rating-display .stars {
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
    line-height: 1;
}

.rating-display .star {
    color: #ddd;
    font-size: 16px;
    cursor: default;
    margin-right: 2px;
    display: inline-block;
    transition: color 0.2s ease;
}

.rating-display .star.filled {
    color: #ffc107;
}

.rating-input {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1;
}

.star-input {
    color: #ddd;
    font-size: 28px;
    cursor: pointer;
    margin-right: 3px;
    display: inline-block;
    transition: color 0.2s ease;
    user-select: none;
}

.star-input:hover,
.star-input.hover {
    color: #ffc107;
}

.star-input.selected {
    color: #ffc107;
}

.resena-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.resena-item:last-child {
    border-bottom: none;
}

.resena-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.resena-nombre {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.resena-fecha {
    color: #666;
    font-size: 0.85rem;
}

.resena-calificacion {
    margin: 5px 0;
    font-size: 14px;
}

.resena-calificacion .star {
    color: #ffc107;
    font-size: 14px;
    margin-right: 1px;
}

.resena-comentario {
    color: #555;
    line-height: 1.5;
    margin-top: 8px;
    font-size: 0.95rem;
}

.sin-resenas {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Mejorar la apariencia del modal de reseñas */
#resenasModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#resenasModal .card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#resenasModal .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Estilos para hacer la tabla más responsive */
@media (max-width: 768px) {
    .rating-display {
        font-size: 0.85rem;
    }
    
    .rating-display .stars {
        font-size: 14px;
    }
    
    .rating-display .star {
        font-size: 14px;
    }
}

.fila-contenido {
    transition: all 0.3s ease;
}

.fila-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.fila-fade-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes highlightRow {
    0% {
        background-color: #fff;
    }
    20% {
        background-color: #e3f2fd;
    }
    100% {
        background-color: #fff;
    }
}

.editorial-tag {
    display: inline-flex;
    align-items: center;
    background-color: #0d6efd;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.editorial-tag .btn-close {
    padding: 0.25rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.form-control:focus {
    box-shadow: none;
}

.search-container {
    display: flex;
    align-items: center;
    position: relative;
    width: 300px;
    height: 38px;
}

.slide-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 100%;
    left: 0;
}

.slide-out {
    transform: translateX(-20px);
    opacity: 0;
    pointer-events: none;
}

.google-search-container {
    position: absolute;
    width: 100%;
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    visibility: hidden;
}

.google-search-container.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.google-search-container .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.google-search-container .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
}

.google-search-container .btn-outline-success {
    border-radius: 0;
}

.google-search-container .btn-outline-danger {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.ejemplares-badge {
    font-size: 0.9em;
    padding: 0.4em 0.6em;
}

.ejemplares-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ejemplares-disponibles {
    color: #6c757d;
    font-size: 0.85em;
}

/* Estilos para el modal y contenido */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
}

/* Estilos para la portada del libro */
.book-image-container {
    width: 100%;
    max-height: 500px;
    overflow: visible;
}

.book-cover-wrapper {
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    width: 100%;
    height: auto;
}

.book-cover {
    width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block;
}

.book-shadow {
    position: absolute;
    bottom: -20px;
    left: 5%;
    width: 90%;
    height: 20px;
    background: rgba(0,0,0,0.1);
    filter: blur(10px);
    border-radius: 50%;
}

.book-cover-wrapper:hover {
    transform: rotateY(10deg);
}

/* Estilos para la información */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.info-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.info-card label {
    display: block;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.info-card p {
    margin: 0;
    color: #212529;
    font-size: 0.95rem;
}

/* Estilos para el resumen */
.resumen-content {
    border-left: 3px solid #0d6efd;
    background-color: #f8f9fa;
}

/* Estilos para los ejemplares */
.ejemplares-grid {
    display: grid;
    gap: 0.75rem;
}

.ejemplares-grid .list-group-item {
    border: none;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.ejemplares-grid .list-group-item:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateX(4px);
}

/* Estilos para botones */
.btn-outline-primary {
    border-width: 1.5px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal.show .modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* Estilos adicionales para la búsqueda de títulos */
#titulo-resultados {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#titulo-resultados .list-group-item-action {
    border-left: none;
    border-right: none;
    transition: all 0.2s ease;
}

#titulo-resultados .list-group-item-action:first-child {
    border-top: none;
}

#titulo-resultados .list-group-item-action:last-child {
    border-bottom: none;
}

#titulo-resultados .list-group-item-action.active,
#titulo-resultados .list-group-item-action:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-color: #dee2e6;
}

#titulo-resultados .list-group-item-action mark {
    background-color: rgba(255, 245, 157, 0.7);
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}

#titulo-resultados .badge {
    font-size: 0.7em;
}

/* Mejoras para la tabla de libros */
.table-responsive {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
}

/* Estilos para las columnas específicas */
.table .col-3 { /* Título */
    min-width: 200px;
}

.table .col-2 { /* Autor y Calificación */
    min-width: 150px;
}

.table .col-1 { /* Edad, Estado, Ejemplares */
    min-width: 80px;
    max-width: 120px;
}

/* Estilos para badges de autores */
.badge.bg-light.text-dark {
    border: 1px solid #dee2e6;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Estilos para el título del libro */
.fw-bold.text-primary {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

/* Estilos para los badges de estado */
.badge.p-2 {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Estilos para la calificación */
.rating-display .stars {
    font-size: 1.1rem;
    color: #ffc107;
}

.rating-display .star {
    transition: all 0.2s ease;
}

/* Estilos para los botones de acción */
.btn-group-vertical .btn-group {
    margin-bottom: 0.25rem;
}

.btn-group-vertical .btn-group:last-child {
    margin-bottom: 0;
}

.btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
}

/* Estilos para tooltips en móviles */
@media (max-width: 768px) {
    .table .col-3 {
        min-width: 150px;
    }
    
    .table .col-2 {
        min-width: 120px;
    }
    
    .table .col-1 {
        min-width: 60px;
        max-width: 100px;
    }
    
    .btn-group-vertical {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group {
        flex-direction: row;
        width: 100%;
    }
    
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Animación para resaltar filas actualizadas */
@keyframes highlightRow {
    0% { background-color: rgba(40, 167, 69, 0.2); }
    100% { background-color: transparent; }
}

.fila-actualizada {
    animation: highlightRow 1.5s ease;
}

/* Estilos para códigos Dewey */
.text-muted small {
    font-size: 0.7rem;
    font-weight: 500;
}