/**
 * LES Power Ranking - Frontend Styles
 */

:root {
    --lpr-primary-color: #FF2B2B;
    --lpr-bg-circle: #230909;
    --lpr-bg-dark: #2a1a1a;
    --lpr-bg-slot: #3d2020;
    --lpr-border-color: #FF2B2B;
    --lpr-team-fill: #FF2B2B;
}

.lpr-container {
    margin: 0 auto;
    font-family: var(--et_global_heading_font, 'Inter', sans-serif);
}

/* ===================== */
/* SVG Team Icons */
/* ===================== */
.lpr-team-svg {
    width: 50%;
    height: 50%;
    pointer-events: none;
}

.lpr-teams-source .lpr-team-svg {
    width: 100%;
    height: 100%;
}

/* Estilos para elementos con clase .fill dentro de SVGs inline */
.lpr-team-svg .fill {
    fill: var(--lpr-team-fill);
    transition: fill 0.2s ease;
}

/* ===================== */
/* Teams Source Row */
/* ===================== */
.lpr-teams-source {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 0;
    margin-bottom: 40px;
}

.lpr-team-draggable {
    width: 70px;
    height: 70px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.lpr-team-draggable:active {
    cursor: grabbing;
}

.lpr-team-draggable img,
.lpr-team-draggable object {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.2s ease;
}

.lpr-team-draggable:hover img,
.lpr-team-draggable:hover object {
    transform: scale(1.1);
}

.lpr-team-draggable.used {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

.lpr-team-draggable.used img,
.lpr-team-draggable.used object {
    filter: grayscale(50%);
}

.lpr-team-draggable.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

/* ===================== */
/* Ranking Slots Row */
/* ===================== */
.lpr-ranking-slots {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    padding: 30px 0;
}

.lpr-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lpr-slot-circle {
    width: 157px;
    height: 157px;
    border-radius: 50%;
    background: var(--lpr-bg-circle);
    border: 1px solid rgba(255, 43, 43, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.lpr-slot-circle::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    background: url(../img/shield.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

.lpr-slot-circle.has-team::before {
    display: none;
}

.lpr-slot-circle.drag-over {
    border-color: #fff;
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.05);
}

.lpr-slot-circle img,
.lpr-slot-circle object {
    width: 70px;
    height: 70px;
    object-fit: contain;
    z-index: 1;
}

.lpr-slot-position {
    width: 40px;
    height: 40px;
    background: var(--lpr-primary-color);
    color: var(--lpr-bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: -25px;
    z-index: 1;
}

.lpr-slot-name {
    color: var(--lpr-primary-color);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    max-width: 100px;
    line-height: 1.3;
    min-height: 32px;
}

/* Remove team button */
.lpr-slot-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
}

.lpr-slot-circle.has-team .lpr-slot-remove {
    display: flex;
}

.lpr-slot-circle.has-team {
    border-color:var(--lpr-border-color);
}

.lpr-slot-circle.has-team .fill {
    fill: var(--lpr-team-fill);
    transition: fill 0.2s ease;
}

.lpr-slot-remove:hover {
    background: #cc0000;
}

/* ===================== */
/* Submit Button */
/* ===================== */
.lpr-submit-container {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.lpr-submit-btn {
    padding: 14px 60px;
    background: transparent;
    color: var(--lpr-bg-dark);
    border-radius: 5px;
    border: 2px solid var(--lpr-primary-color);
    background: var(--lpr-primary-color);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lpr-submit-btn:hover:not(:disabled) {
    background: var(--lpr-primary-color);
    color: var(--lpr-bg-dark);
}

.lpr-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================== */
/* Loading */
/* ===================== */
.lpr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: var(--lpr-primary-color);
    font-size: 14px;
}

.lpr-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--lpr-bg-slot);
    border-top-color: var(--lpr-primary-color);
    border-radius: 50%;
    margin-right: 10px;
    animation: lpr-spin 0.8s linear infinite;
}

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

/* ===================== */
/* Messages */
/* ===================== */
.lpr-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px auto;
    font-size: 14px;
    max-width: 400px;
    text-align: center;
}

.lpr-message.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.lpr-message.error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

/* ===================== */
/* Results Section */
/* ===================== */
.lpr-results-section {
    padding: 25px;
}

.lpr-results-title {
    color: var(--lpr-primary-color);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lpr-results-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.lpr-result-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lpr-result-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--lpr-bg-circle);
    border: 1px solid var(--lpr-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lpr-result-circle img,
.lpr-result-circle object {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.lpr-result-position {
    width: 28px;
    height: 28px;
    background: var(--lpr-primary-color);
    color: var(--lpr-bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: -25px;
    z-index:5;
}

.lpr-result-name {
    color: var(--lpr-primary-color);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    max-width: 100px;
    line-height: 1.3;
}

.lpr-voted-notice {
    margin-top: 30px;
    padding: 12px 16px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--lpr-primary-color);
    border-radius: 8px;
    color: var(--lpr-primary-color);
    font-size: 14px;
    text-align: center;
}

.lpr-no-data {
    text-align: center;
    color: var(--lpr-primary-color);
    padding: 30px;
    font-style: italic;
    opacity: 0.7;
}

.lpr-notice {
    text-align: center;
    padding: 20px;
    background: var(--lpr-bg-slot);
    border-radius: 8px;
    color: var(--lpr-primary-color);
}

/* ===================== */
/* Responsive */
/* ===================== */
@media (max-width: 768px) {
    .lpr-teams-source {
        gap: 15px;
    }
    
    .lpr-team-draggable {
        width: 50px;
        height: 50px;
    }
    
    .lpr-ranking-slots,
    .lpr-results-grid {
        gap: 15px;
    }
    
    .lpr-slot-circle,
    .lpr-result-circle {
        width: 80px;
        height: 80px;
    }
    
    .lpr-slot-circle img,
    .lpr-slot-circle object,
    .lpr-result-circle img,
    .lpr-result-circle object {
        width: 55px;
        height: 55px;
    }
    
    .lpr-slot-name,
    .lpr-result-name {
        font-size: 8px;
        max-width: 65px;
    }
}

@media (max-width: 480px) {
    .lpr-container {
        padding: 15px 10px;
    }
    
    .lpr-team-draggable {
        width: 40px;
        height: 40px;
    }
    
    .lpr-slot-circle,
    .lpr-result-circle {
        width: 65px;
        height: 65px;
    }
    
    .lpr-slot-circle img,
    .lpr-slot-circle object,
    .lpr-result-circle img,
    .lpr-result-circle object {
        width: 45px;
        height: 45px;
    }
    
    .lpr-slot-position,
    .lpr-result-position {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .lpr-submit-btn {
        padding: 12px 40px;
        font-size: 14px;
    }
}

/* Hidden elements */
.lpr-honeypot {
    position: absolute;
    left: -9999px;
}
