/**
 * Public Styles
 *
 * @package Lottery_Results
 */

/* Latest Results Shortcode */
.lr-latest-results {
    max-width: 100%;
    margin: 20px 0;
}

.lr-results-header {
    margin-bottom: 30px;
}

.lr-title {
    font-size: 2em;
    font-weight: bold;
    color: #1e3a8a;
    margin: 0 0 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lr-date {
    font-size: 1.2em;
    font-weight: bold;
    color: #1e3a8a;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lr-results-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lr-draw-result {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.lr-draw-result:last-child {
    border-bottom: none;
}

.lr-draw-time {
    font-size: 1.1em;
    color: #4b5563;
    min-width: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lr-numbers {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.lr-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--lr-ball-color, #E31E24);
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.lr-ball.lr-animate {
    animation: fadeInScale 0.5s ease-out;
}

/* Ball sizes */
.lr-ball-size-small .lr-ball {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.lr-ball-size-medium .lr-ball {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.lr-ball-size-large .lr-ball {
    width: 70px;
    height: 70px;
    font-size: 28px;
}

.lr-ball:hover {
    transform: scale(1.05);
}

.lr-ball-empty {
    background-color: #d1d5db;
    color: #6b7280;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark Theme */
.lr-theme-dark {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 30px;
    border-radius: 8px;
}

.lr-theme-dark .lr-title,
.lr-theme-dark .lr-date {
    color: #f9fafb;
}

.lr-theme-dark .lr-draw-time {
    color: #d1d5db;
}

.lr-theme-dark .lr-draw-result {
    border-bottom-color: #374151;
}

/* Results Table Shortcode */
.lr-results-table-wrapper {
    margin: 20px 0;
}

.lr-search-form {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.lr-search-form form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.lr-search-input,
.lr-date-input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.lr-search-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.lr-search-button:hover {
    background-color: #005a87;
}

.lr-clear-search {
    padding: 10px 15px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.lr-clear-search:hover {
    text-decoration: underline;
}

.lr-refresh-button {
    padding: 10px 15px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.lr-refresh-button:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.lr-refresh-button:active {
    transform: scale(0.95);
}

.lr-refresh-icon {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}

@keyframes lr-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.lr-table-container {
    overflow-x: auto;
}

.lr-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.lr-results-table thead {
    background-color: #f3f4f6;
}

.lr-results-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lr-results-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.lr-results-table tbody tr:hover {
    background-color: #f9fafb;
}

.lr-results-table tbody tr:last-child td {
    border-bottom: none;
}

.lr-winning-numbers {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    font-weight: 600;
    color: #1e3a8a;
}

.lr-no-results {
    text-align: center;
    padding: 40px !important;
    color: #6b7280;
    font-style: italic;
}

/* Pagination */
.lr-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.lr-page-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.lr-page-link:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.lr-page-current {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.lr-page-current:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.lr-page-ellipsis {
    padding: 8px 5px;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lr-title {
        font-size: 1.5em;
    }
    
    .lr-date {
        font-size: 1em;
    }
    
    .lr-draw-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lr-draw-time {
        min-width: auto;
    }
    
    .lr-ball {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lr-results-table {
        font-size: 14px;
    }
    
    .lr-results-table th,
    .lr-results-table td {
        padding: 10px 8px;
    }
    
    .lr-search-form form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lr-search-input,
    .lr-date-input {
        width: 100%;
        min-width: auto;
    }
    
    .lr-search-button,
    .lr-clear-search {
        width: 100%;
        text-align: center;
    }
    
    /* Convert table to cards on mobile */
    .lr-table-container {
        display: block;
    }
    
    .lr-results-table,
    .lr-results-table thead,
    .lr-results-table tbody,
    .lr-results-table th,
    .lr-results-table td,
    .lr-results-table tr {
        display: block;
    }
    
    .lr-results-table thead {
        display: none;
    }
    
    .lr-results-table tbody tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 15px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .lr-results-table td {
        border: none;
        padding: 8px 0;
        position: relative;
        padding-left: 40%;
    }
    
    .lr-results-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 35%;
        font-weight: 600;
        color: #374151;
    }
    
    .lr-pagination {
        gap: 3px;
    }
    
    .lr-page-link {
        padding: 6px 10px;
        font-size: 14px;
        min-width: 35px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lr-ball {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* Accessibility */
.lr-ball:focus,
.lr-page-link:focus,
.lr-search-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .lr-search-form,
    .lr-pagination {
        display: none;
    }
    
    .lr-results-table {
        box-shadow: none;
    }
}

/* jQuery UI Datepicker custom styles */
.ui-datepicker {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    z-index: 9999 !important;
}

.ui-datepicker .ui-datepicker-header {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px 4px 0 0;
}

.ui-datepicker .ui-datepicker-title {
    color: #fff;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255,255,255,0.2);
    border: none;
}

.ui-datepicker td a {
    text-align: center;
}

.ui-datepicker td a.ui-state-active {
    background: #0073aa;
    color: #fff;
}

.ui-datepicker td a.ui-state-hover {
    background: #f0f8ff;
}

