/* ACCIONES DEL SITIO */
.sitio-acciones {
    margin: 16px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* BOTÓN DE RESEÑAS */
.btn-reseñas {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-reseñas:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-reseñas i {
    font-size: 16px;
}

.reseñas-texto {
    flex: 1;
    text-align: left;
}

.reseñas-info {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

/* REPORTAR PROBLEMA AL FINAL */
.reportar-problema-final {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    margin: 12px;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 11px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.reportar-problema-final:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.reportar-problema-final i {
    font-size: 12px;
    color: #f59e0b;
}

/* MODALES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000 !important;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-reseñas, .modal-reporte {
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Especificidad alta para evitar conflictos con otros CSS */
.modal-reseñas .modal-header,
.modal-reporte .modal-header,
.modal-reseña-completa .modal-header {
    padding: 14px 16px 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    position: relative !important; /* Sobrescribir position: absolute de otros CSS */
    top: auto !important;
    right: auto !important;
    background: white;
    border-radius: 12px 12px 0 0;
}

.modal-reseñas .modal-header h3,
.modal-reporte .modal-header h3,
.modal-reseña-completa .modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    flex: 1;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-close i {
    font-size: 16px;
}

.modal-body {
    padding: 16px 20px;
}

/* SISTEMA DE ESTRELLAS */
.rating-stars {
    display: flex;
    gap: 3px;
    margin: 6px 0 10px 0;
}

.star {
    font-size: 22px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: #fbbf24;
    transform: scale(1.1);
}

.star.active {
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* FORMULARIOS */
.form-group {
    margin-bottom: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    min-height: 70px;
}

/* BOTONES DE MODAL */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 20px 16px 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* RESEÑAS ROTATIVAS */
.reseñas-rotativas {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease-in;
}

.reseña-actual {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.reseña-actual:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: translateY(-1px);
}

.reseña-texto {
    font-size: 11px;
    line-height: 1.3;
    color: #374151;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Propiedad estándar para compatibilidad */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.reseña-autor {
    font-size: 10px;
    color: #6b7280;
    font-style: italic;
}

.reseña-autor::before {
    content: "— ";
}

.rating-mini {
    display: inline-flex;
    gap: 1px;
    margin-left: 4px;
}

.rating-mini .star-mini {
    font-size: 8px;
    color: #fbbf24;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MODAL DE RESEÑA COMPLETA */
.modal-reseña-completa {
    max-width: 500px;
    width: 90%;
}

.reseña-completa-content {
    padding: 4px 0;
}

.autor-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.autor-info strong {
    color: #111827;
    font-size: 14px;
}

.rating-display {
    display: flex;
    gap: 2px;
}

.rating-display .star-display {
    font-size: 14px;
    color: #fbbf24;
}

.comentario-completo {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.fecha-reseña {
    font-size: 11px;
    color: #6b7280;
    text-align: right;
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sitio-acciones {
        margin: 12px 0;
        padding: 12px;
    }
    
    .btn-reseñas {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .reportar-problema {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .modal-reseñas, .modal-reporte {
        width: 95%;
        margin: 20px;
    }
    
    .star {
        font-size: 20px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
