/* ── Keno widget ─────────────────────────────────────────── */

/* ── Header ─────────────────────────────────────────────── */

.keno-header {
    background: var(--keno-color, #1952E0);
    padding: 20px 24px;
    text-align: center;
    color: #fff;
}

.keno-header-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 34px;
    letter-spacing: 0;
    color: #fff;
    text-align: center;
}

.keno-header-jackpot {
    font-size: 32px;
    font-weight: 900;
    line-height: 40px;
    letter-spacing: 0;
    margin-bottom: 10px;
    color: #fff;
}

.keno-header-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.keno-header-links a {
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    letter-spacing: 0;
    text-align: center;
    text-decoration: underline;
    color: #fff;
}

.us-widget-keno.loading {
    padding: 16px;
    background: #fff;
}

.keno-skeleton {
    display: flex;
    gap: 24px;
    min-height: 500px;
}

.keno-skeleton-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
}

.keno-skeleton-header {
    height: 150px;
    background: rgb(218, 227, 238);
    flex-shrink: 0;
}

.keno-skeleton-body {
    flex: 1;
    background: linear-gradient(to bottom, rgb(231, 238, 246), rgba(231, 238, 246, 0));
    display: flex;
    align-items: center;
    justify-content: center;
}

.keno-skeleton-right {
    width: 360px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(to bottom, rgb(231, 238, 246), rgba(231, 238, 246, 0));
}

.keno-loader {
    width: 100px;
    height: 100px;
    background-image: url(/Media/widgets/jp-us-beton/pyo/images/tube-spinner.svg);
    background-repeat: no-repeat;
    background-size: contain;
}

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

/* ── Layout ─────────────────────────────────────────────── */

.keno-form {
    display: flex;
    gap: 24px;
    font-family: Axiforma, sans-serif;
    color: #1a1a1a;
    align-items: stretch;
}

.keno-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Left: picker ───────────────────────────────────────── */

.keno-picker {
    flex: 1;
    padding: 16px 20px 20px;
    background: #E7EEF6;
}

.keno-picker-toolbar {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: 80px;
    margin-bottom: 12px;
}

.keno-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.keno-sel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #041A17;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #041A17;
    white-space: nowrap;
    line-height: 20px;
}

.keno-qp-wrap {
    position: relative;
    display: inline-block;
}

.keno-btn-qp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
    width: 146px;
    height: 40px;
    border: 1px solid #041A17;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
    color: #041A17;
}

.keno-btn-qp:hover { opacity: .8; }

.keno-qp-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #041A17;
    margin-left: 4px;
    flex-shrink: 0;
    transition: transform .15s;
}

.keno-qp-wrap.is-open .keno-btn-qp {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.keno-qp-wrap.is-open .keno-qp-caret {
    transform: rotate(180deg);
}

.keno-qp-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 146px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #041A17;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: #fff;
    z-index: 100;
}

.keno-qp-wrap.is-open .keno-qp-menu { display: block; }

.keno-qp-menu li {
    border-top: 1px solid #041A17;
}

.keno-qp-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    color: #041A17;
}

.keno-qp-item:hover { background: #E7EEF6; }




.keno-act-fav { display: none; }

.keno-btn-clear {
    width: 40px;
    height: 40px;
    border: 1px solid #041A17;
    border-radius: 4px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}

.keno-act-fav:hover,
.keno-btn-clear:hover:not(:disabled) { opacity: .75; }

.keno-btn-clear:disabled {
    border-color: #D7DBDB;
    cursor: not-allowed;
}

.keno-divider {
    border: none;
    border-top: 1px solid #D7DBDB;
    margin: 0 -20px;
}

.keno-pick-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    letter-spacing: 0;
    color: #041A17;
    margin: 12px 0 10px;
    text-align: center;
}

/* ── Number grid ────────────────────────────────────────── */

.keno-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 5px;
}

.keno-num {
    height: 48px;
    border: 1.5px solid #d8d8d8;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    color: #041A17;
    padding: 0;
}

.keno-num:hover {
    border-color: var(--keno-color, #1952E0);
    color: var(--keno-color, #1952E0);
}

.keno-grid--full .keno-num:not(.selected) {
    cursor: not-allowed;
}

.keno-grid--full .keno-num:not(.selected):hover {
    border-color: #d8d8d8;
    color: #041A17;
}

.keno-num.selected {
    background: #7856FE;
    border-color: #7856FE;
    border-radius: 8px;
    color: #fff;
}


.keno-btn-add-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 48px;
    padding: 14px 16px;
    margin-top: 25px;
    border-radius: 8px;
    border: 2px solid #58CE70;
    background: #fff;
    color: #041A17;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.keno-btn-add-line:disabled {
    background: #EFEFEF;
    border-color: #D7DBDB;
    color: #9A9A9A;
    cursor: not-allowed;
}

.keno-btn-add-line svg {
    margin-right: 6px;
}

.keno-btn-add-line:disabled svg {
    filter: grayscale(1);
}

.keno-add-line-text {
    padding-top: 4px;
}

.keno-disclaimer {
    margin: 14px 0 4px;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    letter-spacing: 0;
    color: #041A17;
}

.keno-tagline {
    margin: 20px 0 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 23px;
    letter-spacing: 0;
    color: #041A17;
}

/* ── Right: options panel ───────────────────────────────── */

.keno-panel {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keno-panel-card {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.keno-lines-container + .keno-bonus-row {
    border-top: 1px solid #e8e8e8;
}

.keno-panel-line-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.keno-line-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    flex-shrink: 0;
}

.keno-line-label {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
}

/* ── Saved lines ────────────────────────────────────── */

.keno-lines-container {
    height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #D7DBDB transparent;
}

.keno-lines-container::-webkit-scrollbar {
    width: 4px;
}

.keno-lines-container::-webkit-scrollbar-track {
    background: transparent;
}

.keno-lines-container::-webkit-scrollbar-thumb {
    background: #D7DBDB;
    border-radius: 4px;
}

.keno-lines-container::-webkit-scrollbar-thumb:hover {
    background: #b0b5b5;
}

@keyframes keno-line-enter {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes keno-line-exit {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

.keno-line-item--exit {
    animation: keno-line-exit 0.3s ease-in forwards;
    pointer-events: none;
}

@keyframes keno-line-flash {
    0%   { background: #d1fae5; }
    100% { background: transparent; }
}

.keno-line-item--enter {
    animation: keno-line-enter 0.3s ease-out forwards;
}

.keno-line-item--flash {
    animation: keno-line-flash 0.6s ease-out forwards;
}

.keno-line-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}

.keno-line-item:first-child {
    border-top: none;
}

.keno-line-item--locked {
    opacity: 0.45;
    pointer-events: none;
}

.keno-lines--editing .keno-line-item:not(.keno-line--editing) {
    opacity: 0.4;
    pointer-events: none;
}

.keno-line--editing .keno-line-item-actions .keno-line-fav,
.keno-line--editing .keno-line-item-actions .keno-line-del {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.keno-line-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.keno-line-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1.5px solid #5F5F60;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    color: #041A17;
    padding-top: 3px;
}

.keno-line-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 6px;
}

.keno-line-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 2px;
    display: flex;
    align-items: center;
}

.keno-line-item-actions button svg,
.keno-line-item-actions button svg * {
    pointer-events: none;
}

.keno-line-item-actions button:hover { color: #555; }

/* ── Bonus ──────────────────────────────────────────────── */

.keno-bonus-row {
    padding: 14px 16px;
}

.keno-bonus-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.keno-bonus-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    color: #041A17;
    margin-right: 8px;
}

.keno-bonus-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.keno-bonus-desc {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: #5F5F60;
}

.keno-bonus-info {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #041A17;
}

/* toggle */
.keno-toggle {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
    cursor: pointer;
}

.keno-toggle input { opacity: 0; width: 0; height: 0; }

.keno-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 40px;
    background: #D7DBDB;
    transition: background .2s;
}

.keno-toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.keno-toggle input:checked + .keno-toggle-track { background: var(--keno-color, #1952E0); }
.keno-toggle input:checked + .keno-toggle-track::after { transform: translateX(20px); }

.keno-bonus--disabled .keno-toggle,
.keno-bonus--disabled .keno-toggle-track { cursor: not-allowed; }

/* ── Options section ────────────────────────────────────── */

.keno-options-section {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.keno-options-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    color: #041A17;
}

.keno-option-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #D7DBDB;
    padding-top: 14px;
}

.keno-option-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.keno-option-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #041A17;
}

.keno-option-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #041A17 !important;
}

/* Select2 overrides */
.keno-sel-spots + .select2-container,
.keno-sel-wager + .select2-container {
    flex-shrink: 0;
    width: auto !important;
}

.keno-sel-spots + .select2-container .select2-selection--single,
.keno-sel-wager + .select2-container .select2-selection--single {
    border: none !important;
    background: none;
    height: auto;
    outline: none;
    box-shadow: none !important;
    padding-top: 7px;
}

.keno-sel-spots + .select2-container .select2-selection__rendered,
.keno-sel-wager + .select2-container .select2-selection__rendered {
    font-family: Axiforma, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #041A17;
    padding: 0 20px 0 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.keno-sel-spots + .select2-container .select2-selection__arrow,
.keno-sel-wager + .select2-container .select2-selection__arrow {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.keno-sel-spots + .select2-container .select2-selection__arrow b,
.keno-sel-wager + .select2-container .select2-selection__arrow b {
    display: none;
}

.keno-sel-spots + .select2-container .select2-selection__arrow::after,
.keno-sel-wager + .select2-container .select2-selection__arrow::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 15L7 10H17L12 15Z' fill='%23333333'/%3E%3C/svg%3E") no-repeat center / 16px;
}

.select2-container--default .select2-dropdown,
.select2-dropdown {
    border: 1px solid #e8e8e8 !important;
    border-radius: 6px !important;
    font-family: Axiforma, sans-serif;
    font-size: 14px;
    color: #041A17;
}

.select2-results__option {
    padding: 8px 12px;
}

.select2-results__option--highlighted {
    background: var(--keno-color, #1952E0) !important;
    color: #fff !important;
}

/* game count buttons */
.keno-gc-section {
    border-top: 1px solid #D7DBDB;
    padding-top: 14px;
}

.keno-gc-label {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #041A17;
}

.keno-gc-discount {
    margin: 12px 0 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: #7856FE;
}

.keno-gc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keno-gc-btn {
    width: 60px;
    height: 55px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    background: #E7EEF6;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
    color: #041A17;
}

.keno-gc-btn:hover { background: #d8e3ef; }

.keno-gc-btn.active {
    background: var(--keno-color, #1952E0);
    color: #fff;
}

/* ── Total ──────────────────────────────────────────────── */

.keno-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.keno-total-row span:first-child {
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    color: #041A17;
}

.keno-total-val {
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    color: #000000;
}

/* ── CTA ────────────────────────────────────────────────── */

.keno-cta {
    display: block;
    width: calc(100% - 32px);
    margin: 14px 16px 14px;
    padding: 14px 16px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--keno-color, #1952E0);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
    transition: opacity .15s;
    box-sizing: border-box;
}

.keno-cta:disabled {
    background: #D7DBDB;
    border-color: #D7DBDB;
    color: #5F5F60;
    cursor: not-allowed;
}

.keno-cta:not(:disabled):hover { opacity: .88; }

/* Loading state */
.keno-form--loading {
    pointer-events: none;
}

.keno-cta--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.keno-cta-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #b0b5b5;
    border-top-color: var(--keno-color, #1952E0);
    border-radius: 50%;
    animation: keno-spin .7s linear infinite;
    flex-shrink: 0;
    margin-bottom: 5px;
}

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

/* ── Selected balls in toolbar ──────────────────────────── */

.keno-sel-nums {
    position: absolute;
    top: 1px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
    align-content: flex-start;
    max-width: 230px;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.keno-sel-nums--hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.keno-sel-ball--empty {
    background: transparent;
    border-style: dashed;
}

.keno-sel-ball {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #5F5F60;
    color: #041A17;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    box-sizing: border-box;
    padding-top: 3px;
}


/* ── Operating hours modal ───────────────────────────────── */

.keno-oh-modal .modal-footer {
    text-align: center;
    border-top: 1px solid #D7DBDB;
}

.keno-oh-modal .modal-footer .btn {
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    letter-spacing: 0;
    color: #7856FE;
    background: none;
    border: none;
    box-shadow: none;
}

.keno-oh-modal .modal-footer .btn:hover {
    color: #6040e0;
    background: none;
    box-shadow: none;
}

.keno-oh-modal .modal-footer .btn:focus {
    color: #7856FE;
    background: none;
    outline: none;
    box-shadow: none;
}

.keno-oh-modal .modal-body {
    width: 500px;
    height: 290px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
