/* ═══════════════════════════════════════════════════════════════════════════
   MODAL PARA ESCRIBIR OPINIÓN (DECORATIVO)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay del modal */
.review-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.review-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenedor del modal */
.review-modal-container {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Header del modal */
.review-modal-header {
    background: #191919;
    color: white;
    padding: 20px 30px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-modal-company-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-modal-company-logo {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.review-modal-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-modal-company-details h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.review-modal-company-details p {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.review-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.review-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Body del modal */
.review-modal-body {
    padding: 40px 30px;
}

/* PASO 1: Selección de estrellas */
.review-rating-step {
    text-align: center;
}

.review-rating-step h2 {
    font-size: 24px;
    margin: 0 0 30px 0;
    color: #191919;
}

.review-star-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

/* Botones de estrellas individuales */
.review-star-btn {
    width: 80px;
    height: 80px;
    background: #f7f7f7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 4px;
}

.review-star-btn:hover,
.review-star-btn.hover {
    transform: scale(1.05);
}

/* Colores según rating */
.review-star-btn.selected.rating-1,
.review-star-btn.hover.rating-1 {
    background: #FF3333;
    border-color: #FF3333;
}

.review-star-btn.selected.rating-2,
.review-star-btn.hover.rating-2 {
    background: #FF8633;
    border-color: #FF8633;
}

.review-star-btn.selected.rating-3,
.review-star-btn.hover.rating-3 {
    background: #FFC300;
    border-color: #FFC300;
}

.review-star-btn.selected.rating-4,
.review-star-btn.hover.rating-4 {
    background: #7DDA27;
    border-color: #7DDA27;
}

.review-star-btn.selected.rating-5,
.review-star-btn.hover.rating-5 {
    background: #00C07F;
    border-color: #00C07F;
}

.review-star-btn .star-btn-image {
    width: 140%;
    height: 140%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

/* PASO 2: Formulario completo */
.review-form-step {
    display: none;
}

.review-form-step.active {
    display: block;
}

.review-stars-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.review-star-display {
    width: 50px;
    height: 50px;
    border: 2px solid;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

/* Colores para display según rating */
.review-star-display.rating-1 {
    background: #FF3333;
    border-color: #FF3333;
}

.review-star-display.rating-2 {
    background: #FF8633;
    border-color: #FF8633;
}

.review-star-display.rating-3 {
    background: #FFC300;
    border-color: #FFC300;
}

.review-star-display.rating-4 {
    background: #7DDA27;
    border-color: #7DDA27;
}

.review-star-display.rating-5 {
    background: #00C07F;
    border-color: #00C07F;
}

.review-star-display .star-display-img {
    width: 140%;
    height: 140%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.review-form-group {
    margin-bottom: 25px;
}

.review-form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #191919;
}

.review-form-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a90e2;
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.review-form-hint:hover {
    color: #3a7bc8;
    text-decoration: underline;
}

.review-form-hint svg {
    width: 16px;
    height: 16px;
}

.review-form-group textarea,
.review-form-group input[type="text"],
.review-form-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #dcdce6;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.review-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.review-form-group textarea:focus,
.review-form-group input[type="text"]:focus,
.review-form-group input[type="date"]:focus {
    outline: none;
    border-color: #4a90e2;
}

.review-form-group textarea::placeholder,
.review-form-group input::placeholder {
    color: #b7b7b7;
}

.review-form-info {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f7f7f7;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.review-form-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.review-form-info a {
    color: #4a90e2;
    text-decoration: none;
}

.review-form-info a:hover {
    text-decoration: underline;
}

/* Footer del modal */
.review-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.review-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-modal-btn-secondary {
    background: white;
    color: #191919;
    border: 2px solid #dcdce6;
}

.review-modal-btn-secondary:hover {
    background: #f7f7f7;
}

.review-modal-btn-primary {
    background: #00b67a;
    color: white;
}

.review-modal-btn-primary:hover {
    background: #019862;
}

.review-modal-btn-primary:disabled {
    background: #dcdce6;
    cursor: not-allowed;
}

/* Success message */
.review-success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.review-success-message.active {
    display: block;
}

.review-success-icon {
    width: 64px;
    height: 64px;
    background: #00b67a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.review-success-message h2 {
    font-size: 24px;
    margin: 0 0 12px 0;
    color: #191919;
}

.review-success-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .review-modal-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .review-modal-body {
        padding: 30px 20px;
    }

    .review-star-btn {
        width: 65px;
        height: 65px;
    }
}
