/* ==========================================================================
   STICKERLINE.SHOP — COOKIE DARK-YELLOW MODALS, ALERTS & ORDER FLOW UI
   ========================================================================== */

body:has(.liquid-overlay.open),
body.modal-open {
    overflow: hidden !important;
}

.liquid-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.72);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overscroll-behavior: contain;
    will-change: opacity;
    transition: opacity 0.14s ease-out, visibility 0.14s ease-out;
}

.liquid-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.liquid-modal {
    width: 100%;
    max-width: 470px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 26px;
    background: linear-gradient(160deg, #1B1B1F 0%, #151518 100%);
    color: var(--text-main);
    border: 1.5px solid rgba(255, 208, 40, 0.35);
    box-shadow:
        0 24px 60px -10px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 208, 40, 0.15);
    padding: 18px 22px;
    position: relative;
    will-change: transform, opacity;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 208, 40, 0.35) transparent;
}

.liquid-modal.wide-desktop {
    max-width: 890px;
    padding: 18px 22px;
}

.modal-two-col {
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    gap: 18px;
    align-items: start;
}

.modal-col-left,
.modal-col-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.liquid-overlay.open .liquid-modal {
    transform: scale(1) translateY(0);
}

.liquid-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 208, 40, 0.75), transparent);
    border-radius: 99px;
    pointer-events: none;
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #323238;
    background: #232328;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: var(--pink-primary);
    color: #14120B;
    border-color: var(--pink-primary);
    transform: rotate(90deg);
}

.modal-header-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: #FFFFFF;
}

/* ==================== 3-STEP PROGRESS BAR ==================== */
.step-progress-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 0 12px 20px;
}

.step-progress-line {
    position: absolute;
    top: 15px;
    left: 24px;
    right: 24px;
    height: 2.5px;
    background: #2D2D33;
    z-index: 1;
}

.step-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #27272C;
    color: #9CA3AF;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #383840;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.25s;
}

.step-node.active .step-circle,
.step-node.done .step-circle {
    background: var(--pink-primary);
    color: #14120B;
    border-color: #FFE47A;
    box-shadow: 0 4px 14px rgba(255, 208, 40, 0.35);
}

.step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step-node.active .step-label {
    color: var(--pink-primary);
    font-weight: 800;
}

/* ==================== SELECTED PRODUCT BANNER IN MODAL ==================== */
.selected-sticker-box {
    background: #222227;
    border: 1.5px solid rgba(255, 208, 40, 0.35);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.selected-sticker-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #FFF8E7;
    border-radius: 14px;
    padding: 6px;
    flex-shrink: 0;
}

.selected-sticker-name {
    font-size: 1.08rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 2px;
}

.selected-sticker-price {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--pink-primary);
}

/* ==================== STICKER PREVIEW GALLERY IN MODAL ==================== */
.sticker-preview-drawer {
    background: #1F1F24;
    border: 1.5px solid #2E2E35;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 0;
}

.sticker-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--pink-primary);
    margin-bottom: 10px;
}

.sticker-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: 8px;
    max-height: 265px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 4px 6px 4px 3px;
    scrollbar-width: thin;
}

.sticker-preview-cell {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 70px;
    background: #FFF8E7;
    border: 1.5px solid #E8DFC8;
    border-radius: 14px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sticker-preview-grid.theme-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    max-height: 410px;
    gap: 10px;
}

.sticker-preview-cell.theme-cell {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    min-height: 210px;
    padding: 4px;
    border-radius: 16px;
    overflow: hidden;
}

.sticker-preview-cell.theme-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.sticker-preview-cell:hover,
.sticker-preview-cell.playing {
    transform: scale(1.04);
    border-color: var(--pink-primary);
    box-shadow: 0 4px 14px rgba(255, 208, 40, 0.35);
    z-index: 2;
}

.sticker-preview-cell img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.sticker-preview-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #14120B;
    color: var(--pink-primary);
    font-size: 0.58rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== STICKER MAGNIFIER POPUP OVERLAY ==================== */
.sticker-magnifier-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    cursor: pointer;
}

.sticker-magnifier-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sticker-magnifier-card {
    position: relative;
    background: #1B1B1F;
    border: 2px solid var(--pink-primary);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.85);
    border-radius: 32px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 380px;
    width: 100%;
    transform: scale(0.75) translateY(15px);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.sticker-magnifier-overlay.open .sticker-magnifier-card {
    transform: scale(1) translateY(0);
}

.sticker-magnifier-img-wrap {
    width: 260px;
    height: 260px;
    max-width: 72vw;
    max-height: 72vw;
    background: #FFF8E7;
    border-radius: 24px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sticker-magnifier-img-wrap.theme-big {
    width: 310px;
    height: 530px;
    max-width: 82vw;
    max-height: 74vh;
    padding: 8px;
}

.sticker-magnifier-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.sticker-magnifier-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #33333A;
    background: #25252B;
    color: var(--pink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.sticker-magnifier-close:hover {
    background: var(--pink-primary);
    color: #14120B;
    transform: rotate(90deg);
}

/* ==================== BUY MODE SWITCHER (ซื้อให้ตัวเอง / ส่งของขวัญ) ==================== */
.buy-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #111114;
    border: 1px solid #2D2D33;
    padding: 4px;
    border-radius: var(--radius-pill);
    margin-bottom: 10px;
}

.buy-mode-btn {
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: #D1D5DB;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.22s;
}

.buy-mode-btn.active {
    background: var(--pink-primary);
    color: #14120B;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255, 208, 40, 0.28);
}

/* ==================== RECIPIENT 4-CHANNEL CARD ==================== */
.glass-section-card {
    background: #212126;
    border: 1.5px solid #2E2E36;
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.glass-section-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.recipient-method-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.rec-method-pill {
    padding: 8px 8px;
    border-radius: 12px;
    border: 1.5px solid #32323A;
    background: #17171A;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9CA3AF;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}

.rec-method-pill:hover {
    border-color: rgba(255, 208, 40, 0.5);
    color: #FFFFFF;
}

.rec-method-pill.active {
    border-color: var(--pink-primary);
    background: rgba(255, 208, 40, 0.15);
    color: var(--pink-primary);
    font-weight: 800;
}

.recipient-input-row {
    display: flex;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.recipient-text-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1.5px solid #34343C;
    background: #151518;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.94rem;
}

.recipient-text-input::placeholder {
    color: #7D828D;
}

.recipient-text-input:focus {
    outline: none;
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 3px rgba(255, 208, 40, 0.14);
}

.btn-verify-rec {
    flex-shrink: 0;
    padding: 10px 15px;
    border-radius: 14px;
    border: 1.5px solid var(--pink-primary);
    background: rgba(255, 208, 40, 0.12);
    color: var(--pink-primary);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.86rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-verify-rec:hover {
    background: var(--pink-primary);
    color: #14120B;
}

.qr-upload-dropzone {
    border: 2px dashed rgba(255, 208, 40, 0.45);
    background: rgba(255, 208, 40, 0.08);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qr-upload-dropzone:hover {
    background: rgba(255, 208, 40, 0.14);
    border-color: var(--pink-primary);
}

/* การ์ดแสดงผู้รับที่ตรวจผ่านแล้ว (สไตล์มืดขอบเหลืองทองเหมือนภาพตัวอย่าง) */
.verified-recipient-banner {
    margin-top: 12px;
    background: #18241B;
    border: 1.5px solid #22C55E;
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: popBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.verified-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #27382B;
    border: 2px solid #22C55E;
    flex-shrink: 0;
}

.verified-name {
    font-weight: 800;
    font-size: 0.96rem;
    color: #4ADE80;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== PAYMENT METHOD & QR BOX ==================== */
.payment-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 2px solid var(--pink-primary);
    background: rgba(255, 208, 40, 0.1);
    color: #FFFFFF;
    cursor: pointer;
}

.qr-payment-box {
    text-align: center;
    background: #202025;
    border: 1.5px solid rgba(255, 208, 40, 0.4);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 14px;
}

.qr-code-frame {
    width: 220px;
    height: 220px;
    margin: 10px auto;
    padding: 10px;
    border-radius: 18px;
    border: 2px solid var(--pink-primary);
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qr-code-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.satang-highlight-pill {
    display: inline-block;
    background: var(--pink-primary);
    color: #14120B;
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    font-weight: 900;
    font-size: 1.35rem;
    margin: 6px 0;
}

/* ==================== SUCCESS TIMELINE ("ส่งติ๊กเรียบร้อย!") ==================== */
.success-hero-center {
    text-align: center;
    padding: 10px 0 16px;
}

.success-headline {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--pink-primary);
    margin-top: 8px;
}

.timeline-pink-box {
    background: #202025;
    border: 1.5px solid rgba(255, 208, 40, 0.35);
    border-radius: 20px;
    padding: 18px 20px;
    margin: 14px 0;
}

.timeline-step-row {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    padding-bottom: 18px;
}

.timeline-step-row:last-child {
    padding-bottom: 0;
}

.timeline-step-row:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2.5px;
    background: var(--pink-primary);
}

.timeline-check-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pink-primary);
    color: #14120B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    flex-shrink: 0;
    z-index: 2;
}

.timeline-check-circle.pending {
    background: #32323A;
    color: #9CA3AF;
}

/* ==================== TOAST & ALERT ==================== */
.liquid-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.liquid-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 20px;
    background: rgba(26, 26, 30, 0.96);
    color: #FFFFFF;
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    border: 1.5px solid rgba(255, 208, 40, 0.45);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
    animation: popBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.liquid-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: rgba(255, 208, 40, 0.16);
    color: var(--pink-primary);
}

.liquid-toast.success .liquid-toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #4ADE80;
}

.liquid-toast.error .liquid-toast-icon {
    background: rgba(244, 63, 94, 0.2);
    color: #FB7185;
}

@keyframes popBounce {
    0% { opacity: 0; transform: scale(0.82) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
