/* ==========================================================================
   Rate Hunter Plugin - CSS Styles
   ========================================================================== */

/* Variables CSS para fácil personalización */

/* Reset y base */
.rate-hunter-section *,
.rate-hunter-overlay * {
    box-sizing: border-box;}

/* Sección principal de rating */
.rate-hunter-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 0.5rem !important;
    box-shadow: var(--rh-shadow);
    max-width: 500px;
    text-align: center;
    background: #f4f4f4 !important;
	  border: 0.1rem solid #ccc;
    color:  #000 !important;
    position: relative;
    overflow: hidden;
    transition: var(--rh-transition);}

.rate-hunter-section:hover {
    box-shadow: var(--rh-shadow-hover);
    transform: translateY(-2px);}

/* Efecto de brillo sutil */
.rate-hunter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;}

/* Título */
.rate-hunter-section h2 {
    font-size: 1.8rem;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.3;
    position: relative;
    z-index: 1;}

/* Contenedor de estrellas */
.rate-hunter-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    position: relative;
    z-index: 1;}

/* Estrellas individuales */
.rate-hunter-star {
    font-size: 2.5rem;
    color: #fff !imporant;
    cursor: pointer;
    transition: var(--rh-transition);
    transform: scale(1);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    user-select: none;
    position: relative;
    display: inline-block;
    line-height: 1;}

.rate-hunter-star:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.8));
}

.rate-hunter-star.active {
    color: var(--rh-star-color);
    transform: scale(1.1);
    animation: starPulse 0.6s ease-out;}

/* Animación de pulso para estrellas */
@keyframes starPulse {
0% {transform: scale(1);}
50% {transform: scale(1.3);
filter: drop-shadow(0 0 12px rgba(255,215,0,1));}
	100% {transform: scale(1.1);}}

/* Área de resultado */
.rate-hunter-result {
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    min-height: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;}

/* Indicador de carga */
.rate-hunter-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--rh-white);
    animation: spin 1s ease-in-out infinite;}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Estado votado */
.rate-hunter-voted {
    background: linear-gradient(135deg, var(--rh-success-color) 0%, #2ecc71 100%);
}

.rate-hunter-voted .rate-hunter-star {
    cursor: default;
}

.rate-hunter-voted .rate-hunter-star:hover {
    transform: scale(1.1);
    filter: none;
}

/* ========== Popup de Exit Intent ========== */

.rate-hunter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

.rate-hunter-popup {
    background: var(--rh-white);
    padding: 2.5rem;
    border-radius: var(--rh-border-radius);
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.4s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

.rate-hunter-popup h3 {
    color: var(--rh-text-color);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.rate-hunter-popup p {
    color: var(--rh-text-light);
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Botones del popup */
.rate-hunter-popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rate-hunter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rh-transition);
    text-decoration: none;
    display: inline-block;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.rate-hunter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rate-hunter-btn:hover::before {
    left: 100%;
}

.rate-hunter-btn-primary {
    background: linear-gradient(135deg, var(--rh-primary-color) 0%, var(--rh-secondary-color) 100%);
    color: var(--rh-white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.rate-hunter-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.rate-hunter-btn-secondary {
    background: #ecf0f1;
    color: var(--rh-text-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rate-hunter-btn-secondary:hover {
    background: #bdc3c7;
    color: var(--rh-text-color);
    transform: translateY(-1px);
}

/* Botón de cerrar */
.rate-hunter-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #bdc3c7;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--rh-transition);
}

.rate-hunter-close:hover {
    background: #ecf0f1;
    color: var(--rh-text-color);
    transform: rotate(90deg);
}

/* ========== Animaciones de Confetti ========== */

.rate-hunter-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
}

.rate-hunter-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== Responsive Design ========== */

@media (max-width: 768px) {
    .rate-hunter-section {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .rate-hunter-section h2 {
        font-size: 1.5rem;
    }
    
    .rate-hunter-star {
        font-size: 2rem;
        gap: 0.3rem;
    }
    
    .rate-hunter-popup {
        margin: 1rem;
        padding: 2rem;
    }
    
    .rate-hunter-popup-buttons {
        flex-direction: column;
    }
    
    .rate-hunter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rate-hunter-section {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    .rate-hunter-section h2 {
        font-size: 1.3rem;
    }
    
    .rate-hunter-star {
        font-size: 1.8rem;
    }
    
    .rate-hunter-popup {
        margin: 0.5rem;
        padding: 1.5rem;
    }
}

/* ========== Accesibilidad ========== */

.rate-hunter-star:focus,
.rate-hunter-btn:focus,
.rate-hunter-close:focus {
    outline: 2px solid var(--rh-star-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .rate-hunter-section,
    .rate-hunter-star,
    .rate-hunter-btn,
    .rate-hunter-overlay,
    .rate-hunter-popup {
        animation: none;
        transition: none;
    }
    
    .rate-hunter-confetti-piece {
        animation: none;
    }
}

/* ========== Estados de alto contraste ========== */

@media (prefers-contrast: high) {
    .rate-hunter-section {
        border: 2px solid var(--rh-white);
    }
    
    .rate-hunter-star {
        text-shadow: none;
    }
    
    .rate-hunter-btn-primary {
        border: 2px solid var(--rh-primary-color);
    }
    
    .rate-hunter-btn-secondary {
        border: 2px solid var(--rh-text-light);
    }
}

/* ========== Modo oscuro ========== */

@media (prefers-color-scheme: dark) {
    :root {
        --rh-text-color: #ecf0f1;
        --rh-text-light: #bdc3c7;
        --rh-white: #2c3e50;
    }
    
    .rate-hunter-popup {
        background: #34495e;
        color: var(--rh-text-color);
    }
    
    .rate-hunter-btn-secondary {
        background: #34495e;
        color: var(--rh-text-light);
    }
    
    .rate-hunter-btn-secondary:hover {
        background: #2c3e50;
    }
}

/* ========== Utilidades ========== */

.rate-hunter-hidden {
    display: none !important;
}

.rate-hunter-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== Print Styles ========== */

@media print {
    .rate-hunter-overlay,
    .rate-hunter-confetti {
        display: none !important;
    }
    
    .rate-hunter-section {
        background: none !important;
        color: #000 !important;
        box-shadow: none !important;
        border: 1px solid #000;
    }
}