/**
 * Lottery Button Style Fix - CSS with ultra-high specificity selectors
 * Ensures button styling persists through page load and AJAX pagination
 */

/* Pre-emptive styling for dynamic loading */
:root {
    --lty-button-color: #00e93e !important;
    --lty-button-text-color: #000000 !important;
    --lty-button-hover-color: #00c034 !important;
    --lty-button-box-shadow: 0 0 10px rgba(0, 233, 62, 0.4) !important;
    --lty-button-hover-shadow: 0 0 15px rgba(0, 233, 62, 0.6) !important;
}

/* Force all buttons with lty class to have green styling */
html body button[class*="lty-"],
html body input[type="submit"][class*="lty-"],
html body a[class*="lty-"].button,
html body .button[class*="lty-"],
html[class] body[class] form[class] button[class*="lty-"],
#page #content button[class*="lty-"],
.woocommerce button[class*="lty-"],
.lty-frontend button {
    background: var(--lty-button-color) !important;
    background-color: var(--lty-button-color) !important;
    color: var(--lty-button-text-color) !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    padding: 9px 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--lty-button-box-shadow) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 13px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    outline: none !important;
    min-width: 80px !important;
    text-align: center !important;
    margin: 0 5px 5px 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
}

/* Universal immediate-load styles - these will apply as soon as CSS loads */
.lty-ticket-logs-search-btn,
.lty-frontend-search-btn,
.lty-search-btn,
button.lty-ticket-logs-search-btn,
button.lty-frontend-search-btn,
button.lty-search-btn,
input[type="submit"].lty-search-btn,
button[class*="lty-search"],
input[type="submit"][class*="lty-search"] {
    background-color: #00e93e !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    padding: 9px 15px !important;
    font-weight: 600 !important;
	width:30% !important;
	float:right !important;
}

/* Base lottery search button styling with high specificity */
html body .lty-ticket-logs-search-btn,
html body .lty-frontend-search-btn,
html body .lty-search-btn,
html body button.lty-ticket-logs-search-btn,
html body button.lty-frontend-search-btn,
html body button.lty-search-btn,
html body .woocommerce button.lty-ticket-logs-search-btn,
html body .woocommerce button.lty-frontend-search-btn,
html body .woocommerce button.lty-search-btn,
html body input[type="submit"].lty-search-btn,
html body button[class*="lty-search"],
html body input[type="submit"][class*="lty-search"] {
    background-color: #00e93e !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    padding: 9px 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 0 10px rgba(0, 233, 62, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 13px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    outline: none !important;
    min-width: 80px !important;
    text-align: center !important;
    margin: 0 5px 5px 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
	with:60% !important;
	float:left !important;
}

/* Highest specificity selectors for stubborn themes */
html[lang] body[class] .site-content button.lty-ticket-logs-search-btn,
html[lang] body[class] .site-content button.lty-frontend-search-btn,
html[lang] body[class] .site-content button.lty-search-btn,
html[lang] body[class] .woocommerce button.lty-ticket-logs-search-btn,
html[lang] body[class] .woocommerce button.lty-frontend-search-btn,
#page #main article button.lty-search-btn {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Hover state */
html body .lty-ticket-logs-search-btn:hover,
html body .lty-frontend-search-btn:hover,
html body .lty-search-btn:hover,
html body button.lty-ticket-logs-search-btn:hover,
html body button.lty-frontend-search-btn:hover,
html body button.lty-search-btn:hover,
html body .woocommerce button.lty-ticket-logs-search-btn:hover,
html body .woocommerce button.lty-frontend-search-btn:hover,
html body .woocommerce button.lty-search-btn:hover,
html body input[type="submit"].lty-search-btn:hover,
html body button[class*="lty-search"]:hover,
html body input[type="submit"][class*="lty-search"]:hover {
    background-color: #00c034 !important;
    transform: translateY(-2px) !important;
    color: #000000 !important;
}

/* Focus state */
html body .lty-ticket-logs-search-btn:focus,
html body .lty-frontend-search-btn:focus,
html body .lty-search-btn:focus,
html body button.lty-ticket-logs-search-btn:focus,
html body button.lty-frontend-search-btn:focus,
html body button.lty-search-btn:focus,
html body .woocommerce button.lty-ticket-logs-search-btn:focus,
html body .woocommerce button.lty-frontend-search-btn:focus,
html body .woocommerce button.lty-search-btn:focus,
html body input[type="submit"].lty-search-btn:focus,
html body button[class*="lty-search"]:focus,
html body input[type="submit"][class*="lty-search"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 233, 62, 0.8) !important;
}

/* Active state */
html body .lty-ticket-logs-search-btn:active,
html body .lty-frontend-search-btn:active,
html body .lty-search-btn:active,
html body button.lty-ticket-logs-search-btn:active,
html body button.lty-frontend-search-btn:active,
html body button.lty-search-btn:active,
html body .woocommerce button.lty-ticket-logs-search-btn:active,
html body .woocommerce button.lty-frontend-search-btn:active,
html body .woocommerce button.lty-search-btn:active,
html body input[type="submit"].lty-search-btn:active,
html body button[class*="lty-search"]:active,
html body input[type="submit"][class*="lty-search"]:active {
    background-color: #00b02f !important;
    transform: translateY(1px) !important;
}

/* Target through attribute selectors for inline styles */
html body button[style*="background"],
html body input[style*="background"][type="submit"],
html body button[class*="lty"][style],
html body input[type="submit"][class*="lty"][style] {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Class directly added by our JS for better control */
html body .lty-custom-styled-button {
    background-color: #00e93e !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 9px 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 0 10px rgba(0, 233, 62, 0.4) !important;
}

/* Target any color overrides in descendant selectors */
html body .lty-ticket-logs-table button,
html body .lty-ticket-logs-table input[type="submit"],
html body .lty-data-table button,
html body .lty-data-table input[type="submit"],
html body .lty-frontend-table button,
html body .lty-frontend-table input[type="submit"] {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Target buttons specifically after AJAX loading - common pattern */
html body .lty-pagination-wrapper + div button,
html body .lty-pagination-wrapper + div input[type="submit"],
html body .lty-pagination-links + div button,
html body .lty-pagination-links + div input[type="submit"] {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Universal selector emergency override */
html body *[class*="lty-search-btn"] {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Target dynamically inserted content */
html body .lty-data-table-container + div button,
html body .lty-ticket-logs-table + div button,
html body .lty-ticket-logs-filters button {
    background-color: #00e93e !important;
    color: #000000 !important;
}

/* Emergency override for when all else fails */
@keyframes forceGreenButton {
    from { background-color: #00e93e !important; }
    to { background-color: #00e93e !important; }
}

html body button[class*="lty-"],
html body input[type="submit"][class*="lty-"] {
    animation: forceGreenButton 1ms infinite !important;
    background-color: #00e93e !important;
    color: #000000 !important;
} 