/* Betformatics Tipster Performance - Theme Independent & Elementor Compatible
   Dependencies: betformatics-variables (loaded via PHP) */

.betformatics-tipster-performance {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    font-family: inherit !important;
    line-height: normal !important;
}

/* Tipster Name Title */
.betformatics-tipster-performance .tipster-performance-title {
    all: unset !important;
    display: block !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}

.betformatics-tipster-performance * {
    box-sizing: border-box !important;
}

.betformatics-tipster-performance .tipster-stats-table {
    all: unset !important;
    display: block !important;
    width: 100% !important;
}

.betformatics-tipster-performance .tipster-performance-grid {
    all: unset !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: repeat(6, auto) !important;
    gap: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    padding: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    border: 1px solid #ddd !important;
    background: transparent !important;
    box-shadow: none !important;
}

.betformatics-tipster-performance .tipster-performance-label {
    all: unset !important;
    display: block !important;
    padding: 12px !important;
    color: #1848A0 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    border-bottom: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    word-wrap: break-word !important;
    text-align: left !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.betformatics-tipster-performance .tipster-performance-value {
    all: unset !important;
    display: block !important;
    padding: 12px !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: normal !important;
    border-bottom: 1px solid #ddd !important;
    word-wrap: break-word !important;
    text-align: left !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
}

/* Remove bottom border from last row */
.betformatics-tipster-performance .tipster-performance-grid > :nth-last-child(2),
.betformatics-tipster-performance .tipster-performance-grid > :last-child {
    border-bottom: none !important;
}

/* First row - top left rounded corner */
.betformatics-tipster-performance .tipster-performance-grid > :first-child {
    border-top-left-radius: 8px !important;
}

/* First row - top right rounded corner */
.betformatics-tipster-performance .tipster-performance-grid > :nth-child(2) {
    border-top-right-radius: 8px !important;
}

/* Last row - bottom left rounded corner */
.betformatics-tipster-performance .tipster-performance-grid > :nth-last-child(2) {
    border-bottom-left-radius: 8px !important;
}

/* Last row - bottom right rounded corner */
.betformatics-tipster-performance .tipster-performance-grid > :last-child {
    border-bottom-right-radius: 8px !important;
}

/* Profit coloring */
.betformatics-tipster-performance .tipster-performance-value.positive {
    color: #22c55e !important;
    font-weight: bold !important;
}

.betformatics-tipster-performance .tipster-performance-value.negative {
    color: #ef4444 !important;
    font-weight: bold !important;
}

/* Form dots */
.betformatics-tipster-performance .form-dot {
    all: unset !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    margin: 0 3px !important;
    vertical-align: middle !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
}

.betformatics-tipster-performance .form-dot:first-child {
    margin-left: 0 !important;
}

.betformatics-tipster-performance .form-dot:hover {
    transform: scale(1.2) !important;
}

.betformatics-tipster-performance .form-dot.green {
    background-color: #22c55e !important;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.4) !important;
}

.betformatics-tipster-performance .form-dot.red {
    background-color: #ef4444 !important;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.4) !important;
}

.betformatics-tipster-performance .form-dot.yellow {
    background-color: #eab308 !important;
    box-shadow: 0 0 4px rgba(234, 179, 8, 0.4) !important;
}

.betformatics-tipster-performance .no-data {
    color: #999 !important;
    font-style: italic !important;
    font-weight: normal !important;
}

/* Extended stats (when show_extended is true) */
.betformatics-tipster-performance .tipster-performance-grid:has(> :nth-child(13)) {
    grid-template-rows: repeat(7, auto) !important;
}

.betformatics-tipster-performance .tipster-performance-grid:has(> :nth-child(15)) {
    grid-template-rows: repeat(8, auto) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .betformatics-tipster-performance .tipster-performance-grid {
        padding: 0 !important;
        gap: 0 !important;
        width: 100% !important;
    }

    .betformatics-tipster-performance .tipster-performance-label,
    .betformatics-tipster-performance .tipster-performance-value {
        font-size: 12px !important;
        padding: 8px !important;
    }

    .betformatics-tipster-performance .form-dot {
        margin: 0 2px !important;
        width: 10px !important;
        height: 10px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .betformatics-tipster-performance .tipster-performance-label {
        font-size: 11px !important;
        padding: 6px !important;
    }
    
    .betformatics-tipster-performance .tipster-performance-value {
        font-size: 11px !important;
        padding: 6px !important;
    }
    
    .betformatics-tipster-performance .form-dot {
        width: 8px !important;
        height: 8px !important;
        margin: 0 1px !important;
    }
}

/* Page Builder Compatibility (Elementor, Gutenberg, etc.) */
.elementor-widget-container .betformatics-tipster-performance,
.elementor-element .betformatics-tipster-performance,
.wp-block .betformatics-tipster-performance {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure no unwanted styles from any theme tables */
.betformatics-tipster-performance table,
.betformatics-tipster-performance tbody,
.betformatics-tipster-performance tr,
.betformatics-tipster-performance td,
.betformatics-tipster-performance th {
    all: unset !important;
}