/* --- SCOPED CSS FOR LUCKY DRAW PAGE (MOBILE FIRST) --- */
.ld-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Utilities */
.ld-mobile-only {
    display: flex;
}

.ld-desktop-only {
    display: none;
}

.ld-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* ── HEADER (MOBILE) ── */
.ld-header-mobile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0 8px 0;
    gap: 12px;
}

.ld-check-badge-large {
    width: 60px;
    height: 60px;
    background-color: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

    .ld-check-badge-large svg {
        width: 32px;
        height: 32px;
    }

.ld-hm-title {
    font-size: 20px;
    font-weight: 700;
    color: #064E3B;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ld-emoji-left, .ld-emoji-right {
    font-size: 20px;
}

.ld-hm-subtitle {
    font-size: 13px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── TICKET BANNER (MOBILE) ── */
.ld-ticket-mobile {
    background-color: #278144; /* Matches Figma mobile background */
    padding: 10px;
    border-radius: 12px;
    position: relative; /* Becomes the anchor for the absolute corners */
    overflow: hidden; /* Hides the outside halves of the corner circles */
    justify-content: center;
}

.ld-tm-inner {
    border: 1.5px solid #ffffff; /* Updated to white to match Figma */
    border-radius: 8px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: static; /* Overrides default to let corners anchor to the outer wrapper */
}

.ld-tm-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #F8FAFC; /* Paints the page background over the green corner */
    border: 1.5px solid #ffffff; /* Creates the curved inner border that connects to .ld-tm-inner */
    z-index: 2;
}

/* Centers the 32x32 cutouts exactly on the corners of the outer wrapper */
.ld-tm-tl {
    top: -16px;
    left: -16px;
}

.ld-tm-tr {
    top: -16px;
    right: -16px;
}

.ld-tm-bl {
    bottom: -16px;
    left: -16px;
}

.ld-tm-br {
    bottom: -16px;
    right: -16px;
}

.ld-tm-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ld-tm-badge {
    background-color: #FCD34D;
    color: #78350F;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
/* ── TWO COLUMN CARDS (Prize & Winners) ── */
.ld-two-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ld-card-outline {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

.ld-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    background-color: #ffffff;
}

.ld-hdr-icon {
    font-size: 16px;
}

.ld-hdr-title {
    font-size: 12px;
    font-weight: 800;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ld-btn-view-all {
    background: #1F2937;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

/* Prize Inner */
.ld-prize-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #F0FDF4 0%, #FEFCE8 100%);
}

.ld-prize-img {
    width: 72px;
    height: 72px;
    background-color: #D1FAE5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.ld-prize-details {
    flex: 1;
}

.ld-prize-name {
    font-size: 15px;
    font-weight: 800;
    color: #065F46;
    margin-bottom: 4px;
}

.ld-prize-desc {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
}

.ld-prize-value {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

    .ld-prize-value span {
        font-size: 11px;
        font-weight: 500;
        color: #9CA3AF;
        margin-left: 4px;
    }

.ld-gift-icon {
    font-size: 32px;
    flex-shrink: 0;
}

/* Winner Inner */
.ld-winner-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.ld-winner-avatar {
    width: 48px;
    height: 48px;
    background-color: #E5E7EB;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.ld-winner-details {
    flex: 1;
}

.ld-winner-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.ld-winner-loc {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 8px;
}

.ld-winner-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #4B5563;
}


/* ── PROGRESS & MILESTONES ── */
.ld-card-solid {
    background-color: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ld-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ld-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.ld-progress-numbers {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.ld-prog-current {
    font-size: 36px;
    font-weight: 800;
    color: #064E3B;
    line-height: 1;
}

.ld-prog-total {
    font-size: 16px;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 4px;
}

.ld-trophy {
    font-size: 24px;
}

.ld-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #F3F4F6;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.ld-progress-fill {
    height: 100%;
    background-color: #10B981;
    border-radius: 4px;
}

.ld-progress-markers {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 24px;
}

.ld-gold-text {
    color: #D97706;
    font-weight: 700;
}

.ld-milestone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ld-ms-card {
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ld-ms-yellow {
    background-color: #FEFCE8;
    border: 1px solid #FEF08A;
}

.ld-ms-purple {
    background-color: #F5F3FF;
    border: 1px solid #E9D5FF;
}

.ld-ms-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4B5563;
}

    .ld-ms-header svg {
        width: 16px;
        height: 16px;
    }

.ld-ms-yellow .ld-ms-header svg {
    color: #D97706;
}

.ld-ms-purple .ld-ms-header svg {
    color: #9333EA;
}

.ld-ms-number {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.ld-ms-yellow .ld-ms-number {
    color: #B45309;
}

.ld-ms-purple .ld-ms-number {
    color: #7C3AED;
}

.ld-ms-sub {
    font-size: 11px;
    font-weight: 500;
}

.ld-ms-yellow .ld-ms-sub {
    color: #B45309;
}

.ld-ms-purple .ld-ms-sub {
    color: #7C3AED;
}


/* ── HOW IT WORKS ── */
.ld-how-card {
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ld-how-icon {
    flex-shrink: 0;
    color: #059669;
}

    .ld-how-icon svg {
        width: 20px;
        height: 20px;
    }

.ld-how-text h3 {
    font-size: 13px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 4px 0;
}

.ld-how-text p {
    font-size: 12px;
    color: #4B5563;
    line-height: 1.5;
    margin: 0;
}


/* ── BUTTONS ── */
.ld-actions-mobile {
    flex-direction: column;
    gap: 12px;
}

.ld-btn-blue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background-color: #3B82F6;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

    .ld-btn-blue:hover {
        background-color: #2563EB;
    }

    .ld-btn-blue svg {
        width: 18px;
        height: 18px;
    }

.ld-btn-grey {
    width: 100%;
    padding: 14px;
    background-color: #E5E7EB;
    color: #4B5563;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

    .ld-btn-grey:hover {
        background-color: #D1D5DB;
    }


/* ==============================================
   DESKTOP OVERRIDES (MATCHING FIGMA)
   ============================================== */
@media (min-width: 768px) {

    .ld-page-wrapper {
        padding: 40px 0;
    }

    .ld-container {
        max-width: 1000px;
        gap: 20px;
    }

    .ld-mobile-only {
        display: none !important;
    }

    .ld-desktop-only {
        display: flex;
    }
    /* Header */
    .ld-header-desktop {
        display: flex; /* keep flex for header layout */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        background: #ffffff;
        border: 1px solid #10B981;
        border-radius: 12px;
        padding: 20px 24px;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    }


    .ld-hd-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .ld-check-badge-medium {
        width: 48px;
        height: 48px;
        background-color: #10B981;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
    }

        .ld-check-badge-medium svg {
            width: 24px;
            height: 24px;
        }

    .ld-hd-title {
        font-size: 18px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 4px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .ld-hd-title span {
            font-size: 18px;
        }

    .ld-hd-subtitle {
        font-size: 13px;
        color: #6B7280;
        margin: 0;
    }

    .ld-verified-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background-color: #4ADE80;
        color: #ffffff;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
    }

        .ld-verified-pill svg {
            width: 14px;
            height: 14px;
        }
    /* Desktop Ticket Banner */
    .ld-ticket-desktop-wrapper {
        display: block; /* ← KEY FIX: overrides .ld-desktop-only's flex */
        background-color: #BCE4C8;
        border-radius: 16px;
        padding: 20px 24px;
        position: relative;
    }

    .ld-ticket-desktop-inner {
        background-color: #05A650;
        border-radius: 8px;
        padding: 18px 22px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 24px;
        flex-wrap: nowrap;
        overflow: hidden;
        width: 100%; /* ← extra safety: explicit fill */
    }

    .ld-td-notch {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 48px;
        background-color: #F8FAFC;
        border-radius: 50%;
    }

    .ld-td-notch-left {
        left: -16px;
    }

    .ld-td-notch-right {
        right: -16px;
    }

    .ld-td-left {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0; /* lets the text shrink instead of overflowing */
        flex: 1 1 auto;
    }

    .ld-td-right {
        flex: 0 0 auto; /* right keeps its natural width */
        min-width: 0;
    }

    .ld-td-icon {
        width: 44px;
        height: 44px;
        background-color: rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        flex-shrink: 0;
    }

        .ld-td-icon svg {
            width: 22px;
            height: 22px;
        }

    .ld-td-text-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .ld-td-label {
        color: rgba(255, 255, 255, 0.8);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }

    .ld-td-value {
        color: #ffffff;
        font-size: 19px;
        font-weight: 800;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* ── Status box — more compact (closer to Figma) ── */
    .ld-td-status-box {
        display: flex;
        align-items: center;
        background-color: #1A7036;
        border-radius: 10px;
        padding: 10px 14px;
        gap: 14px; /* reduced from 24px */
    }

    .ld-td-status-text {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .ld-td-activated {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #ffffff;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }

        .ld-td-activated svg {
            width: 15px;
            height: 15px;
        }

    .ld-td-id {
        color: rgba(255, 255, 255, 0.75);
        font-size: 10.5px;
        white-space: nowrap;
    }

    .ld-td-gift {
        width: 36px; /* reduced from 40px */
        height: 36px;
        background-color: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        flex-shrink: 0;
    }

        .ld-td-gift svg {
            width: 18px;
            height: 18px;
        }
    /* Layout tweaks for desktop */
    .ld-two-col {
        flex-direction: row;
        gap: 20px;
    }

    .ld-card-outline {
        flex: 1;
        border-radius: 16px;
    }

    .ld-card-solid {
        padding: 24px 32px;
        border-radius: 16px;
    }

    .ld-milestone-card {
        padding: 20px 24px;
    }

    .ld-how-card {
        padding: 20px 24px;
    }

    .ld-actions-desktop {
        flex-direction: row;
        justify-content: flex-end;
        gap: 16px;
    }

    .ld-btn-grey {
        width: auto;
        padding: 12px 32px;
    }

    .ld-btn-blue {
        width: auto;
        padding: 12px 32px;
    }
}
/* Narrow desktop / tablet landscape — extra compact */
@media (min-width: 768px) and (max-width: 1024px) {
    .ld-ticket-desktop-inner {
        padding: 16px 18px;
        gap: 18px;
    }

    .ld-td-value {
        font-size: 17px;
    }

    .ld-td-status-box {
        padding: 9px 12px;
        gap: 12px;
    }

    .ld-td-id {
        font-size: 10px;
    }

    .ld-td-icon {
        width: 40px;
        height: 40px;
    }
}

