/* =========================================================
   LOTTERY TICKET CARD
   ========================================================= */

.ticket-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 18px;
    overflow: hidden;
}


/* =========================================================
   LOTTERY BANNER
   ========================================================= */

.ticket-banner {
    width: 100%;
    background: #eef3ff;
    padding: 10px;
    border-radius: 16px;
    overflow: hidden;
}

.ticket-banner img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 10px;
}


/* =========================================================
   LOTTERY TITLE
   ========================================================= */

.ticket-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 18px 18px 8px;
}

.ticket-title-name {
    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 19px;
    font-weight: 700;

    color: #111827;
}

.ticket-title-name i {
    font-size: 18px;
}

.price {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 70px;

    padding: 8px 15px;

    border-radius: 25px;

    background: #198754;
    color: #fff;

    font-size: 17px;
    font-weight: 700;
}


/* =========================================================
   TICKET COUNT
   ========================================================= */

.ticket-count {
    padding: 0 18px 12px;

    color: #64748b;

    font-size: 14px;
}


/* =========================================================
   TICKET AREA
   ========================================================= */

.ticket-area {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    padding: 4px 18px 20px;
}


/* =========================================================
   HIDE CHECKBOX
   ========================================================= */

.checkbox-budget {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


/* =========================================================
   TICKET BUTTON
   ========================================================= */

.checkbox-budget + label {
    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 10px 5px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    color: #111827;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    text-align: center;

    white-space: nowrap;

    box-shadow:
        0 3px 8px rgba(
            0,
            0,
            0,
            0.06
        );

    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .1s ease,
        box-shadow .18s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

.checkbox-budget + label:hover {
    border-color: #198754;

    box-shadow:
        0 4px 10px rgba(
            0,
            0,
            0,
            0.09
        );

    transform: translateY(-1px);
}


/* =========================================================
   SELECTED TICKET
   ========================================================= */

.checkbox-budget:checked + label {
    background: #198754;

    border-color: #198754;

    color: #fff;

    box-shadow:
        0 4px 12px rgba(
            25,
            135,
            84,
            0.25
        );
}

.checkbox-budget:checked + label::before {
    content: "✓";

    margin-right: 5px;

    font-size: 14px;
}


/* =========================================================
   FOCUS
   ========================================================= */

.checkbox-budget:focus-visible + label {
    outline: 3px solid rgba(
        25,
        135,
        84,
        0.25
    );

    outline-offset: 2px;
}


/* =========================================================
   NO TICKET
   ========================================================= */

.no-ticket-message {
    width: 100%;

    padding: 25px 15px;

    text-align: center;

    color: #64748b;

    font-size: 14px;

    background: #f8fafc;

    border-radius: 10px;
}


/* =========================================================
   BOTTOM CONFIRM BAR
   ========================================================= */

.bottom-confirm {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 100;

    padding:
        10px 15px
        calc(10px + env(safe-area-inset-bottom));

    background: rgba(
        255,
        255,
        255,
        0.96
    );

    border-top:
        1px solid #e5e7eb;

    box-shadow:
        0 -4px 15px rgba(
            0,
            0,
            0,
            0.08
        );
}

.bottom-confirm button {
    width: 100%;

    max-width: 900px;

    display: block;

    margin: 0 auto;

    min-height: 50px;

    border: 0;

    border-radius: 28px;

    background: #198754;

    color: #fff;

    font-size: 17px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        opacity .2s ease;
}

.bottom-confirm button:hover {
    background: #157347;
}


/* =========================================================
   CONFIRM MODAL OVERLAY
   ========================================================= */

.confirm-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(
        0,
        0,
        0,
        0.55
    );
}

.confirm-overlay.show {
    display: flex;
}


/* =========================================================
   MODAL
   ========================================================= */

.confirm-dialog {
    width: 100%;
    max-width: 500px;

    max-height: 85vh;

    overflow-y: auto;

    background: #fff;

    border-radius: 16px;

    padding: 22px;

    box-shadow:
        0 15px 50px rgba(
            0,
            0,
            0,
            0.20
        );
}

.confirm-dialog h3 {
    margin: 0 0 8px;

    font-size: 21px;

    color: #111827;
}

.confirm-dialog p {
    margin: 0 0 15px;

    color: #64748b;

    font-size: 14px;
}


/* =========================================================
   SELECTED LIST
   ========================================================= */

.selected-list {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    max-height: 250px;

    overflow-y: auto;

    padding: 5px 0;
}

.selected-list-item {
    padding: 7px 10px;

    background: #e9f7ef;

    color: #146c43;

    border-radius: 7px;

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   CONFIRM ACTIONS
   ========================================================= */

.confirm-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;

    margin-top: 20px;
}

.btn-confirm-booking,
.btn-cancel-booking {
    min-height: 46px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 700;
}

.btn-confirm-booking {
    border: 0;

    background: #198754;

    color: #fff;
}

.btn-confirm-booking:hover {
    background: #157347;
}

.btn-confirm-booking:disabled {
    opacity: .65;

    cursor: not-allowed;
}

.btn-cancel-booking {
    border:
        1px solid #dc3545;

    background: #fff;

    color: #dc3545;
}

.btn-cancel-booking:hover {
    background: #fff5f5;
}


/* =========================================================
   MODAL BODY LOCK
   ========================================================= */

body.modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .ticket-title {
        padding:
            15px 12px 7px;
    }

    .ticket-title-name {
        font-size: 17px;
    }

    .price {
        min-width: 68px;

        padding:
            7px 13px;

        font-size: 16px;
    }

    .ticket-count {
        padding:
            0 12px 10px;
    }

    .ticket-area {
        padding:
            4px 12px 18px;

        gap: 9px;
    }

    .checkbox-budget + label {
        min-height: 46px;

        padding:
            8px 3px;

        font-size: 14px;
    }

    .bottom-confirm {
        padding-left: 10px;
        padding-right: 10px;
    }

    .bottom-confirm button {
        min-height: 48px;

        font-size: 16px;
    }

    .confirm-dialog {
        padding: 18px;

        border-radius: 14px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .ticket-area {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .checkbox-budget + label {
        font-size: 13px;
    }

    .confirm-actions {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   LOTTERY BOOKING FLOW
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f5f7;
    color: #111827;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    width: 100%;
    min-height: 100vh;
    background: #f3f5f7;
}


/* =========================================================
   HEADER
   ========================================================= */

.app-header {
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    background: linear-gradient(
        90deg,
        #1468f5,
        #5121ed
    );

    color: #fff;
}

.logo {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #fff;
    text-decoration: none;

    font-size: 20px;
    font-weight: 700;
}

.logo i {
    font-size: 21px;
}

.header-icon {
    font-size: 25px;
    color: #fff;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    width: 100%;

    padding: 32px 15px 34px;

    text-align: center;

    background: linear-gradient(
        110deg,
        #1767f5,
        #5420ed
    );

    color: #fff;
}

.hero h2 {
    margin: 0 0 10px;

    font-size: 30px;
    line-height: 1.2;

    font-weight: 700;
}

.hero p {
    margin: 0;

    font-size: 17px;

    line-height: 1.5;

    color: #fff;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content {
    width: 100%;

    max-width: 760px;

    margin: 0 auto;

    padding: 20px 14px 90px;
}


/* =========================================================
   COMMON BOX
   ========================================================= */

.box {
    width: 100%;

    margin-bottom: 18px;

    padding: 22px;

    background: #fff;

    border-radius: 22px;

    box-shadow:
        0 5px 20px rgba(
            0,
            0,
            0,
            0.07
        );
}


/* =========================================================
   SELECTED TICKETS
   ========================================================= */

.box h5 {
    margin: 0 0 18px;

    font-size: 18px;

    font-weight: 700;

    color: #111827;
}

.box h5:first-letter {
    color: #ff3b81;
}


/* =========================================================
   TICKET SUMMARY
   ========================================================= */

.ticket-summary {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 20px;
}

.ticket-summary .ticket {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 8px 18px;

    border-radius: 25px;

    background: #0869f7;

    color: #fff;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================================
   AMOUNT BOX
   ========================================================= */

.amount-box {
    width: 100%;

    margin: 0 !important;

    padding: 18px;

    border-radius: 18px;

    background: #eaf2ff;

    color: #0059ff;

    font-size: 17px !important;

    font-weight: 700;

    line-height: 1.6;
}


/* =========================================================
   FORM
   ========================================================= */

.field {
    width: 100%;

    margin-bottom: 21px;
}

.field label {
    display: block;

    margin-bottom: 8px;

    color: #111;

    font-size: 15px;

    font-weight: 700;
}


/* =========================================================
   INPUT / SELECT
   ========================================================= */

.field input,
.field select,
.field textarea {
    display: block;

    width: 100%;

    height: 57px;

    padding: 0 17px;

    border: 1px solid #cbd5e1;

    border-radius: 13px;

    outline: none;

    background: #fff;

    color: #111827;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 17px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.field input::placeholder {
    color: #64748b;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #1677ff;

    box-shadow:
        0 0 0 3px rgba(
            22,
            119,
            255,
            0.12
        );
}


/* =========================================================
   TERMS
   ========================================================= */

.agree-row {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin: 4px 0 20px;

    padding-left: 3px;
}

.agree-row input {
    width: 17px;
    height: 17px;

    margin: 1px 0 0;

    flex-shrink: 0;

    accent-color: #0879ff;
}

.agree-row label {
    margin: 0;

    color: #111;

    font-size: 14px;

    line-height: 1.5;
}

.agree-row a {
    color: #006eff;

    text-decoration: none;
}

.agree-row a:hover {
    text-decoration: underline;
}


/* =========================================================
   BOOK NOW BUTTON
   ========================================================= */

.btn-book-now {
    width: 100%;

    height: 62px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0;

    border: 0;

    border-radius: 32px;

    background: #198f5b;

    color: #fff;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 20px;

    font-weight: 700;

    cursor: pointer;

    box-shadow: none;

    transition:
        background .2s ease,
        transform .1s ease;
}

.btn-book-now:hover {
    background: #157a4e;
}

.btn-book-now:active {
    transform: scale(.99);
}

.btn-book-now:disabled {
    opacity: .65;

    cursor: not-allowed;
}


/* =========================================================
   NAV LINKS
   ========================================================= */

.nav-links {
    margin-top: 22px;

    text-align: center;

    font-size: 16px;
}

.nav-links a {
    color: #006eff;

    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}


/* =========================================================
   ERROR
   ========================================================= */

.booking-error {
    width: 100%;

    padding: 15px;

    margin-bottom: 18px;

    border: 1px solid #ffb5b5;

    border-radius: 12px;

    background: #fff0f0;

    color: #b42318;

    font-size: 14px;

    line-height: 1.5;
}

.booking-error a {
    color: #006eff;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .app-header {
        height: 58px;

        padding: 0 16px;
    }

    .logo {
        font-size: 20px;
    }

    .header-icon {
        font-size: 24px;
    }


    .hero {
        padding:
            30px 12px
            34px;
    }

    .hero h2 {
        font-size: 29px;
    }

    .hero p {
        font-size: 17px;
    }


    .content {
        padding:
            25px 14px
            95px;
    }


    .box {
        padding: 22px 18px;

        border-radius: 22px;
    }


    .box h5 {
        font-size: 18px;
    }


    .ticket-summary .ticket {
        padding:
            8px 17px;

        font-size: 14px;
    }


    .amount-box {
        padding: 17px;

        font-size: 17px !important;
    }


    .field {
        margin-bottom: 21px;
    }


    .field label {
        font-size: 15px;
    }


    .field input,
    .field select {
        height: 57px;

        font-size: 17px;
    }


    .btn-book-now {
        height: 62px;

        font-size: 19px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .hero h2 {
        font-size: 25px;
    }

    .hero p {
        font-size: 15px;
    }

    .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .box {
        padding:
            19px 15px;
    }

    .ticket-summary {
        gap: 8px;
    }

    .ticket-summary .ticket {
        padding:
            8px 13px;

        font-size: 13px;
    }

    .amount-box {
        font-size: 15px !important;
    }

    .field input,
    .field select {
        font-size: 16px;
    }

}

.payment-upload {
    margin: 15px 0;

    padding: 16px;

    border: 1px dashed #cbd5e1;

    border-radius: 14px;

    background: #f8fafc;

    text-align: left;
}

.payment-upload label {
    display: block;

    margin-bottom: 8px;

    font-weight: 700;

    color: #0066ff;
}

.payment-upload input[type="file"] {
    width: 100%;

    padding: 10px;

    background: #fff;

    border: 1px solid #d1d5db;

    border-radius: 8px;
}

.payment-upload small {
    display: block;

    margin-top: 7px;

    color: #64748b;
}