/* ======================================
   ⚠️ Error Message Styling
====================================== */
.wpk-lottery-error {
    background: #ffe9e9;
    color: #c62828;
    padding: 12px 16px;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    font-size: 15px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.wpk-lottery-error::before {
    content: "❌ ";
    font-weight: bold;
    margin-right: 5px;
}

/* ======================================
   📊 Lottery Table (Miền Bắc)
====================================== */

/* 🔄 Table Container */
.lottery-table-responsive {
    overflow: auto;
    width: 100%;
    max-width: 100%;
}
.lottery-table-medium {
    min-width: 700px;
}

/* 📋 Table Structure */
.lottery-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 15px;
    background: #FFF;
}
.lottery-table * {
    color: #000;
    line-height: 1.5;
}
.lottery-table th,
.lottery-table td {
    border: 1px solid #e0e0e0;
    padding: 0;
    margin: 0;
}
.lottery-table th {
    background: #f2f2f2;
    font-weight: bold;
    padding: 15px;
    text-align: center;
    font-size: 15px;
}

/* 🟥 Title Row */
.lottery-table .lottery-title {
    background: #9a0000;
    color: #fff;
    font-size: 16px;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}

/* 📆 Date Row */
.lottery-table .lottery-date-row td.lottery-label {
    border-right: 0;
    padding: 10px;
    background: #f0cf64;
}
.lottery-table .lottery-date-row td.lottery-time {
    border-left: 0;
    padding: 10px;
    background: #f0cf64;
}

/* 📏 Column Width */
.lottery-table .lottery-small-width {
    width: 100px;
    text-align: center;
    min-width: 100px;
}

/* 🎁 Prize Items */
.lottery-table .items-prize-lottery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    justify-items: center;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    line-height: 24px;
}
.lottery-table .items-prize-lottery .lottery-item {
    padding: 10px;
    width: 100%;
    text-align: center;
    border: 1px solid #f8f8f8;
}
.lottery-table .lottery-static-item:hover,
.lottery-table .items-prize-lottery .lottery-item:hover {
    background: #FFEAA5;
}
.lottery-table .lottery-static-item .item-special-prizes {
    padding: 2px 0px;
}
.lottery-table .full-items-prize-lottery {
    grid-template-columns: auto;
}
.lottery-table .full-items-prize-lottery .lottery-item {
    padding: 10px;
}

/* 🌟 Special Prize - Đặc biệt */
.lottery-table .lottery-db * {
    font-size: 25px;
    color: #990000;
}

/* 🔍 Highlighted Number */
.lottery-table .lottery-highlight {
    color: #990000;
    font-weight: bold;
}
.lottery-highlight-number {
    border-radius: 50%;
    background: radial-gradient(circle at 5px 5px, #feff01, #ff0000);
    box-shadow: 3px 3px 10px -2px rgba(0,0,0,.4);
    padding: 5px;
}

/* ======================================
   🎯 Find Number (Bộ lọc số)
====================================== */
.lottery-find-number {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px 0;
}
.lottery-find-number a {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: radial-gradient(circle at 5px 5px, #ff5c5c, #080000);
    text-shadow: none;
    color: #fff !important;
    line-height: 25px;
    text-align: center;
    font-size: 15px;
    margin: 3px auto;
}

/* ======================================
   💻 Lottery Mega (Điện toán)
====================================== */
.lottery-mega {
    border: 1px solid #9E9E9E;
    background: #fff;
    padding: 0;
    margin: 20px 0;
    border-radius: 7px;
    overflow: hidden;
    font-size: 15px;
    width: 100%;
    display: block;
}
.lottery-mega-header {
    background: #9a0000;
    padding: 10px 15px;
    color: #FFF;
}
.lottery-mega-header .lottery-mega-title {
    font-weight: 700;
    font-size: 18px;
}
.lottery-mega-header .lottery-mega-date {
    font-size: 14px;
}

/* 📑 Label Section */
.lottery-mega .lottery-mega-label {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    font-weight: 700;
    background: #f6e4aa;
    border-top: 1px solid #EEE;
    border-bottom: 1px solid #EEE;
}
.lottery-mega .lottery-mega-label div {
    width: 50%;
}
.lottery-mega .lottery-mega-label .lottery-mega-date {
    font-weight: 400;
    text-align: right;
    font-size: 13px;
    color: #000;
}

/* 🔢 Mega Numbers */
.lottery-mega .lottery-mega-items {
    width: 100%;
}
.lottery-mega .lottery-mega-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0;
}
.lottery-mega .lottery-mega-item {
    display: inline-block;
    background: radial-gradient(circle at 5px 5px, #ffffff, #88888c);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    line-height: 48px;
    font-weight: 700;
    font-size: 22px;
    margin: 5px;
    text-align: center;
}

/* ======================================
   🔎 General Search Form
====================================== */
#lottery-search-form {
    display: flex;
    flex-direction: row;
    margin: 10px 0;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: wrap;
}
#lottery-search-form * {
    margin: 0px;
    padding: 0px;
}
#lottery-search-form select,
#lottery-search-form input {
    border: 1px solid #a9a9a9;
    padding: 5px 10px;
    box-shadow: none !important;
    outline: none !important;
    padding-right: 20px;
    height: 32px;
    border-radius: 2px;
    font-size: 14px;
    width:auto;
}
#lottery-search-form input.hasDatepicker{
    background: url(calendar.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right 5px center;
}
#lottery-search-form select {
    background: none;
    padding: 0px 15px;
}
#lottery-search-form button {
    background: none;
    border: 1px solid #a9a9a9;
    padding: 5px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 32px;
    color: #bf0100;
    height: 32px;
}
#lottery-search-form button[type="submit"] {
    width: auto;
    background: #bf0100;
    color: #FFF;
    border-radius: 2px;
    padding: 0px 25px;
    font-size: 15px;
    height: auto;
}
.title-lottery-search-form {
    text-transform: uppercase;
    margin: 15px 0px;
    display: block;
    width: 100%;
    font-weight: 700;
    font-size: 16px;
    background: #ffeca0;
    border: solid 1px #dddfe2;
    padding: 10px;
}
#lottery-search-form .label-radio{
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    margin:0px 5px 0px 0px;
    font-weight: 400;
}
#lottery-search-form .label-radio input[type='radio']{
    margin:0px 5px 0px 0px;
}
#lottery-search-form.lottery-tail-match{
    align-items: flex-end;
}
#lottery-search-form .col-lottery-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; 
    width: 100%;
    padding: 5px 0px;
}
#lottery-search-form .col-lottery-search-form select,
#lottery-search-form .col-lottery-search-form input{
    width:100%;
}
/* 📅 Datepicker Styling */
.ui-datepicker .ui-datepicker-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.ui-widget.ui-widget-content {
    box-shadow: 0px 0px 10px #ccc;
}
.ui-datepicker td span,
.ui-datepicker td a {
    border: 1px solid #e1e1e1 !important;
    padding: 5px !important;
}

/* ======================================
   🎨 Utility & Misc Classes
====================================== */
.lottery-black-color {
    color: #000;
}
.lottery-red-color {
    color: #FF0000;
}
.lottery-table .lottery-static-item {
    font-weight: bold;
    padding: 15px;
    text-align: center;
    font-size: 16px;
}
.statics-lottery-search-form {
    display: flex;
    flex-direction: row;
    margin: 0px -10px !important;
    flex-wrap: wrap;
}
#lottery-search-form .statics-lottery-search-form-item {
    display: block;
    padding: 0px 10px;
}
.statics-lottery-search-form label {
    text-transform: uppercase;
    display: block;
    width: 100%;
    margin-bottom: 5px !important;
}
#lottery-search-form .quick-range-buttons {
    display: inline-flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 5px;
    padding: 0px;
}
#lottery-search-form .quick-range-buttons a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid #a9a9a9;
    border-radius: 2px;
}
#lottery-search-form .quick-range-buttons a:hover {
    background: #bf0100;
    color: #FFF;
    border-color:#bf0100;
}

/* 📊 Table Center and Frequency */
.lottery-table-center th {
    background: #9a0000;
    color: #FFF;
    padding: 10px 5px;
    text-align: center;
}
.lottery-table-center td {
    padding: 5px;
    text-align: center;
}
.lottery-progress-bar {
    display: inline-block;
    height: 5px;
    background-color: #e27d00;
    vertical-align: middle;
    margin-right: 5px;
}
.title-lottery-statics {
    text-transform: uppercase;
    margin: 10px 0px;
    display: block;
    width: 100%;
    font-weight: 700;
    font-size: 16px;
}
.lottery-table-frequency td,
.lottery-table-frequency th {
    padding: 10px !important;
}

/* ======================================
   📱 Responsive (Mobile)
====================================== */
@media (max-width: 992px) {
    #lottery-search-form .statics-lottery-search-form-item {
        width: 100%;
        padding: 5px 10px;
    }
    #lottery-search-form select, #lottery-search-form input{
        width:100%;
    }
}
@media (max-width: 768px) {
    .lottery-table .items-prize-lottery {
        grid-template-columns: repeat(2, 1fr) !important;
        font-size: 18px;
    }
    .lottery-table .lottery-db .items-prize-lottery {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}
@media (max-width: 576px) {
    .lottery-table .items-prize-lottery {
        font-size: 16px;
    }
    #lottery-search-form {
        flex-wrap: wrap;
    }
    #lottery-search-form button {
        display: none;
    }
    .lottery-mega .lottery-mega-item {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 18px;
    }
}