/* Styles for plugin, loaded on every page and combined by litespeed */

div.chartjs {
    position: relative; 
    height: 400px;
    width:100%;
}

@media (max-width: 479px) {
    div.chartjs {
        height: 200px;
    }
}

div.chartjs canvas {
    margin: auto;
    display: block;
    width: 100%;
    height: 100%;
}

h2.pronostic-section-title {
    margin-top: 10px;
}

p.pronostic-section-text {
    font-size: 0.9rem;
}

.toggle-btn, button.blue, input.blue, select.blue {
    display: inline-block;
    margin: 5px;
    font-size: 1em;
    padding: 5px;              /* Spacious padding */
    background-color: #4A90E2;       /* Blueish background */
    color: #ffffff;                  /* White text */
    border: none;                    /* Remove default border */
    border-radius: 5px;             /* Rounded corners */
    cursor: pointer;                 /* Pointer cursor on hover */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; /* Smooth transitions */
    max-width:97%;
}

button.yellow, input.yellow, select.yellow {
    display: inline-block;
    margin: 5px;
    font-size: 1em;
    padding: 5px;              /* Spacious padding */
    background-color: #f4c839;      
    color: #000000;
    border: none;                    /* Remove default border */
    border-radius: 5px;             /* Rounded corners */
    cursor: pointer;                 /* Pointer cursor on hover */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; /* Smooth transitions */  
    max-width:97%;               
}

button.blue, button.yellow {
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
}

.toggle-btn:active {
    transform: scale(0.98); /* Slightly shrink the button */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Revert shadow */
}

table.dataTable>tbody>tr>th, table.dataTable>tbody>tr>td {
    padding: 5px;
}

#multi-draws-by-year table.dataTable td:first-child {
    white-space: normal;
}

.nowrap {
    white-space: nowrap;
}

@media (max-width: 479px) {
    .blue_table th.nomobile, .blue_table td.nomobile {
        display:none;
    }
}

/* Modals with draw details for Eurodreams and some Loto draws */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    /* Added flex display for centering */
    display: none; /* This will be overridden when modal is shown */
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: url('https://www.tirage-euromillions.net/wp-content/themes/tirage-euro/images/bg_tirage.webp') no-repeat left top;
    background-size: 100% 100%;
    color: #fff;
    text-align: center;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0 3px 20px 3px;
    /* Remove margin and adjust positioning */
    margin: 40px auto auto auto;
    /* Add box-sizing to include padding in width calculation */
    box-sizing: border-box;
}
.modal-content .close {
    color: #f8d260;
    float: right;
    margin: 10px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.modal-content .close:hover {
    color: rgb(224, 224, 224);
}

.modal-content .draw-numbers {
    margin-bottom: 30px;
    text-align: center;
}
.modal-content .draw-details {
    margin-top: 20px;
}

.modal-content h1 {
    background: none;
    border: none;
    text-shadow: none;
    box-shadow: none;
}

.modal-content .section-title {
    font-family: Oswald, sans-serif;
    font-size: 22px;
}

.modal-content .ball, .modal-content .star {
    margin: 5px;
}

.modal-content .winners-table {
    text-align: right;
}

/* Added responsive adjustments for modal */
@media (max-width: 479px) {
    .modal-content {
        width: 95%;
    }
}

/* Random number generator */
.random-generator button {
    font-size: 20px;
    width: 40px;
}

table.pronostics-express.keno .ball {
    width: 30px;
    height: 30px;
    font-size: 18px;
}

.blue_table.center td {
    text-align: center;
}

/* Wheel systems, number/stars selection */

/* General Styles for Both Selections */
.number-selection, .star-selection {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Enables inline-flex behavior */
    flex-wrap: wrap;
    gap: 10px; /* Space between items */
}

.number-selection li, .star-selection li {
    /* Ensures each item is inline-block */
    display: inline-block;
}

/* Hide the native checkbox */
.number-selection input[type="checkbox"],
.star-selection input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    left: -9999px;
}

/* Label Styles */
.number-selection label, .star-selection label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 50px; /* Adjust size as needed */
    height: 50px;
    text-align: center;
    font-weight: bold;
    color: white;
    user-select: none;
    position: relative;
    transition: transform 0.2s;
}

.number-selection label:hover,
.star-selection label:hover {
    transform: scale(1.1);
}

/* Blue Ball Styles */
.number-selection label::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-color: #007BFF; /* Blue color */
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

.number-selection input[type="checkbox"]:checked + label::before {
    background-color: #fd9f1b; /* when selected */
    transform: scale(1.1);
}

/* Yellow Star Styles */
.star-selection label::before {
    content: '★'; /* Unicode star character */
    font-size: 30px;
    color: #fd9f1b; /* Yellow color */
    transition: color 0.3s, transform 0.3s;
}

.star-selection input[type="checkbox"]:checked + label::before {
    color: #69440f; /* Darker yellow when selected */
    transform: scale(1.2);
}

/* Optional: Enhance Accessibility */
.number-selection input[type="checkbox"]:focus + label::before,
.star-selection input[type="checkbox"]:focus + label::before {
    outline: 2px dashed #474748;
    outline-offset: 4px;
}

/* Text Inside Labels (if needed) */
.number-selection label span,
.star-selection label span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none; /* Allows clicking on the label */
}

/* Loading animation */
/* HTML: <div class="loader"></div> */
.loader {
    margin: 65px auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    color: #062cb7;
    box-shadow: 
        38px -38px 0 0px, 76px -38px 0 0px, 114px -38px 0 0px,
        38px 0     0 10px, 76px 0     0 10px, 114px 0     0 10px,
        38px 38px  0 0px, 76px 38px  0 0px, 114px 38px  0 0px;
    transform: translateX(-76px);
    animation: d6 4s infinite linear;
}

@keyframes d6 {
    12.5% {box-shadow: 
        38px -38px 0 0px, 76px -38px 0 0px, 114px -38px 0 10px,
        38px 0     0 10px, 76px 0     0 0px, 114px 0     0 10px,
        38px 38px  0 0px, 76px 38px  0 0px, 114px 38px  0 0px}
    25%   {box-shadow: 
        38px -38px 0 10px, 76px -38px 0 0px, 114px -38px 0 10px,
        38px 0     0 0px, 76px 0     0 0px, 114px 0     0 0px,
        38px 38px  0 0px, 76px 38px  0 10px, 114px 38px  0 0px}
    50%   {box-shadow: 
        38px -38px 0 10px, 76px -38px 0 10px, 114px -38px 0 0px,
        38px 0     0 0px, 76px 0     0 0px, 114px 0     0 0px,
        38px 38px  0 0px, 76px 38px  0 0px, 114px 38px  0 10px}
    62.5% {box-shadow: 
        38px -38px 0 0px, 76px -38px 0 0px, 114px -38px 0 0px,
        38px 0     0 10px, 76px 0     0 0px, 114px 0     0 0px,
        38px 38px  0 0px, 76px 38px  0 10px, 114px 38px  0 10px}
    75%   {box-shadow: 
        38px -38px 0 0px, 76px -38px 0 10px, 114px -38px 0 0px,
        38px 0     0 0px, 76px 0     0 0px, 114px 0     0 10px,
        38px 38px  0 0px, 76px 38px  0 0px, 114px 38px  0 10px}
    87.5% {box-shadow: 
        38px -38px 0 0px, 76px -38px 0 10px, 114px -38px 0 0px,
        38px 0     0 0px, 76px 0     0 10px, 114px 0     0 0px,
        38px 38px  0 10px, 76px 38px  0 0px, 114px 38px  0 0px}
}