/**
 * Momo LMS Archive Styles
 * Extracted from templates/archive-course_lesson.php
 */

:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
}

.momo-lms-archive-wrapper { 
    background: #f1f5f9; 
    font-family: var(--font-body); 
    margin: 0; padding: 0; 
    min-height: 100vh; 
}

/* HERO SECTION - MODERN GLASSMORPHISM */
.py-landing-hero {
    background: radial-gradient(circle at top left, #4f46e5, transparent 70%), radial-gradient(circle at bottom right, #db2777, transparent 70%), #1e1b4b;
    color: white;
    padding: 70px 20px 40px;
    text-align: center;
    border-radius: 0 0 0px 00px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px -10px rgba(79, 70, 229, 0.3);
    margin-bottom: 50px;
}

/* Animated Background Mesh */
.py-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.4;
}
.py-blob {
    position: absolute;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    filter: blur(80px);
    border-radius: 50%;
    animation: moveBlob 20s infinite alternate;
}
.py-blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; animation-delay: 0s; }
.py-blob-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: linear-gradient(135deg, #f43f5e, #f59e0b); animation-delay: -5s; }

@keyframes moveBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

.py-hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }

.py-landing-title { 
    font-family: var(--font-head);
    font-size: 56px; font-weight: 800; margin-bottom: 0px; letter-spacing: -1.5px;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.2);
    line-height: 1.1;
}
.py-landing-desc { 
    font-size: 18px; color: #cbd5e1; line-height: 1.7; font-weight: 400; max-width: 700px; margin: 0 auto;
}

/* SEARCH BAR - GLASS */
.py-search-box {
    margin-top: 50px;
    position: relative;
    max-width: 650px;
    margin-left: auto; margin-right: auto;
}
.py-search-input {
    width: 100%;
    padding: 22px 30px;
    padding-right: 140px; /* Space for button */
    border-radius: 60px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 16px;
    color: white;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    outline: none;
    transition: all 0.3s ease;
}
.py-search-input::placeholder { color: rgba(255,255,255,0.7); }
.py-search-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.25);
}

/* NAVIGATION PILLS */
.py-nav-wrapper { margin-top: -85px; margin-bottom: 60px; position: relative; z-index: 3; display: flex; justify-content: center; }
.py-nav-pills { 
    background: white; 
    padding: 8px; 
    border-radius: 20px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
    display: flex; gap: 5px; flex-wrap: wrap; justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
}
.py-nav-item {
    padding: 10px 24px;
    border-radius: 14px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}
.py-nav-item:hover { color: var(--dark); background: #f1f5f9; }
.py-nav-item.active {
    background: var(--dark);
    color: white;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

/* Mobile Nav: Horizontal Scroll */
@media (max-width: 600px) {
    .py-nav-wrapper {
        display: block;
        overflow-x: auto;
        padding-bottom: 10px; /* Space for scrollbar if any/touch target */
        margin-left: 0; margin-right: 0; /* Respect container padding */
        padding-left: 0; padding-right: 0;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        text-align: center; /* Center if small */
        /* Hide Scrollbar */
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .py-nav-wrapper::-webkit-scrollbar { display: none; }
    
    .py-nav-pills {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 10px; /* Increase gap slightly */
        width: max-content;
        /* Remove min-width 100% to allow true center if small */
        /* But if large, it grows */
        padding: 8px 12px; /* Adjust padding inside pill container */
    }
    .py-nav-item {
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }
}

/* CONTAINER & TITLE */
.py-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }

.py-section-title { 
    font-family: var(--font-head);
    font-size: 32px; font-weight: 800; color: var(--dark); 
    margin-bottom: 40px; 
    text-align: center; 
    display: flex; flex-direction: column; align-items: center; gap: 15px; /* Column to place bar below */
    letter-spacing: -0.5px;
}
/* Bottom Bar Underline */
.py-section-title::after { 
    content:''; display:block; width: 60px; height: 6px; 
    background: var(--secondary); border-radius: 4px; 
    margin-top: 5px;
}
.py-section-title::before { display: none; } /* Ensure left bar is gone */

/* COURSE GRID - Responsive */
.py-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}

/* MODERN CARD UI */
.py-course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.05); /* Soft shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(226, 232, 240, 0.6);
    height: 100%;
    position: relative;
}

.py-course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.py-card-thumb {
    height: 200px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.py-card-thumb img { 
    width: 100%; height: 100%; object-fit: cover; 
    transition: transform 0.6s ease; 
}
.py-course-card:hover .py-card-thumb img { transform: scale(1.1); }

/* Overlay Gradient on Thumb */
.py-card-thumb::after {
    content:''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0.6;
}

/* BADGES */
.py-badge-learning {
    position: absolute; top: 15px; left: 15px;
    background: rgba(16, 185, 129, 0.9); backdrop-filter: blur(4px);
    color: white; font-size: 11px; font-weight: 700;
    padding: 5px 12px; border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-transform: uppercase; letter-spacing: 0.5px;
    z-index: 5;
}

.py-voucher-badge {
    position: absolute; top: 15px; right: 15px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white; font-size: 11px; font-weight: 800;
    padding: 5px 12px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    z-index: 6;
    transform: rotate(0deg);
    transition: transform 0.3s;
}

/* LIMIT BADGE - MOVED TO BOTTOM LEFT */
.py-limit-badge {
    position: absolute; 
    bottom: 15px; left: 15px; /* Bottom Left */
    top: auto; right: auto;
    background: rgba(0,0,0,0.6); color: white;
    padding: 6px 14px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    backdrop-filter: blur(4px); z-index: 5;
    display: flex; align-items: center; gap: 5px;
}
.py-limit-badge.urgent { background: #ef4444; animation: pulse-red 2s infinite; }

/* BODY */
.py-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.py-card-title { 
    font-family: var(--font-head);
    font-size: 18px; font-weight: 700; margin: 0 0 10px 0; 
    color: var(--dark); line-height: 1.4; 
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
}
.py-course-card:hover .py-card-title { color: var(--primary); }

.py-card-desc { 
    font-size: 13px; color: var(--gray); margin-bottom: 20px; flex: 1; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* META FOOTER */
.py-card-meta {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px dashed #e2e8f0; 
    padding-top: 15px; margin-top: auto;
}

.py-meta-lessons { 
    display: flex; align-items: center; gap: 6px; 
    font-size: 13px; color: var(--gray); font-weight: 500; 
}
.py-meta-lessons svg { width: 16px; height: 16px; color: #94a3b8; }

.py-price-box { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.py-price-origin { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.py-price-final { font-size: 18px; font-weight: 800; color: var(--primary); font-family: var(--font-head); }
.py-price-free { font-size: 18px; font-weight: 800; color: #10b981; font-family: var(--font-head); }

/* SEARCH FIX - USING FLEX */
.py-search-btn {
    position: absolute;
    right: 10px; 
    top: -7px; 
    bottom: 6px;
    color: var(--primary);
    border: none;
    padding: 0 25px;
    border-radius: 50px;
    font-family: var(--font-head);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
    height: auto; /* Allow auto height based on top/bottom */
}

/* USER BUBBLE - FLOAT BOTTOM RIGHT */
.py-user-bubble {
    position: fixed;
    bottom: 30px; right: 30px; /* Fixed Bottom Right */
    top: auto; /* Reset Top */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999; /* Higher Index */
    font-size: 14px;
    color: var(--dark);
    border: 1px solid rgba(255,255,255,0.8);
    font-family: var(--font-body);
    animation: pyFadeInUp 0.5s ease;
}
@keyframes pyFadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

.py-user-avatar {
    width: 36px; height: 36px; background: var(--primary); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
}
.py-user-logout {
    width: 32px; height: 32px; background: #fee2e2; color: #ef4444;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.py-user-logout:hover { background: #ef4444; color: white; transform: rotate(90deg); }

/* Mobile Optimization for Bubble */
@media(max-width: 600px) {
    .py-user-bubble {
        padding: 6px; /* Tighter padding */
        bottom: 20px; right: 20px;
        gap: 8px;
    }
    .py-user-bubble span { display: none; } /* Hide Name */
    .py-user-avatar { width: 32px; height: 32px; font-size: 13px; }
    .py-user-logout { width: 32px; height: 32px; }
}

@media (max-width: 768px) {
    #py-archive-popup-overlay {
        align-items: flex-start !important;
        padding-top: 20px !important; /* Reduced from 60px */
    }
    .py-course-popup {
        max-height: calc(100% - 40px) !important;
    }
}

/* Google Button */
.momo-google-btn-new {
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    padding: 10px 24px; border-radius: 4px; text-decoration: none;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif; 
    font-weight: 500; font-size: 15px; margin-top: 5px;
    transition: all 0.2s ease-in-out;
    animation: googleBorderPulse 2s infinite;
}
.momo-google-btn-new img { width: 18px; height: 18px; margin-right: 12px; }
.momo-google-btn-new:hover { 
    background: #fff; color: #202124;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60,64,67,0.15), 0 1px 3px rgba(60,64,67,0.3);
}
@keyframes googleBorderPulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4); border-color: #4285f4; }
    70% { box-shadow: 0 0 0 6px rgba(66, 133, 244, 0); border-color: #4285f4; }
    100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); border-color: #dadce0; }
}

/* Popup Styles matching Design */

/* Timer Effect */
.py-timer-box {
    background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48;
    padding: 10px 15px; border-radius: 8px; display: inline-block;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.1);
    animation: pulse-timer 2s infinite;
}
@keyframes pulse-timer {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Lesson List Item */
.py-popup-lesson-item {
    padding: 12px 15px; border-bottom: 1px solid #f3f4f6; font-size: 14px; color: #4b5563;
    display: flex; justify-content: space-between; align-items: center; background: #fff;
}
.py-popup-lesson-item:last-child { border-bottom: none; }
.py-popup-lesson-item:hover { background: #f9fafb; color: #111; }
.py-popup-lesson-icon { margin-right: 8px; color: #9ca3af; }
.py-popup-lesson-btn { 
    background: #e5e7eb; color: #6b7280; font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; 
}
.py-benefits-content ul { list-style: none; padding: 0; margin: 0; }
.py-benefits-content li { position: relative; padding-left: 20px; margin-bottom: 6px; }
.py-benefits-content li::before {
    content: '✔'; position: absolute; left: 0; color: #10b981; font-size: 12px; top: 2px;
}

/* [RESTORED] Main Grid & Card Styles */
.py-course-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px;
    margin-bottom: 40px;
}
.py-course-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column;
    text-decoration: none; position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.py-course-card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px rgba(0,0,0,0.08); border-color: #cbd5e1; }

.py-card-thumb {
    position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
    background: #f1f5f9; overflow: hidden;
}
.py-card-thumb img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.5s ease;
}
.py-course-card:hover .py-card-thumb img { transform: scale(1.05); }

/* Badges */
.py-badge-learning {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,0.6); color: white;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    backdrop-filter: blur(4px); z-index: 2;
}

/* Body */
.py-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.py-card-title {
    margin: 0 0 10px; font-size: 16px; font-weight: 700; color: #1e293b;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.4;
}
.py-card-desc {
    font-size: 13px; color: #64748b; margin-bottom: 15px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.5;
}

/* Meta */
.py-card-meta {
    display: flex; justify-content: space-between; align-items: flex-end;
    border-top: 1px solid #f1f5f9; padding-top: 15px; margin-top: auto;
}
.py-meta-lessons { display: flex; align-items: center; font-size: 13px; color: #64748b; gap: 5px; }
.py-meta-lessons svg { width: 16px; height: 16px; color: #94a3b8; }

.py-price { font-weight: 700; color: #2563eb; font-size: 16px; }
/* [FIX] Class Mismatch & Spacing */
.py-price-origin, .py-price-original {
    font-size: 14px; color: #94a3b8; text-decoration: line-through; 
    display: block; text-align: right; 
    margin-bottom: 4px; /* Space out */
    font-weight: 500;
}
.py-price-final {
    font-weight: 700; color: #2563eb; display:block;
}
/* Popup specific overrides */
#py-popup-price .py-price-final {
    color: #d82d7a; /* Match popup blue */
    font-size: 28px; /* Maintain large size */
}
#py-popup-price .py-price-origin {
    font-size: 15px; /* Slightly larger in popup */
}

/* [RESTORED] Flash Sale & Card Styles */
.py-limit-badge {
    position: absolute; top: 10px; left: 10px;
    background: #ef4444; color: white;
    padding: 2px 8px; border-radius: 4px;
    font-size: 12px; font-weight: 700;
    z-index: 5; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* Hard Fix */
    height: auto !important; width: auto !important;
    line-height: normal !important; margin: 0 !important;
    display: inline-block !important; letter-spacing: normal;
}
.py-flash-timer {
    display: flex; align-items: center; gap: 5px;
    color: #d97706; font-size: 13px; font-weight: 600;
    margin-top: 5px;
}
.py-flash-icon { color: #f59e0b; animation: pyFlash 1.5s infinite; }
@keyframes pyFlash { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.py-is-flash-sale {
    border: 1px solid #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
    position: relative; overflow: hidden;
}
.py-is-flash-sale::before {
    content: ""; position: absolute; top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-25deg);
    animation: pyCardShine 3s infinite;
    pointer-events: none; z-index: 10;
}
@keyframes pyCardShine {
    0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; }
}

/* Reset */
.py-pay-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; height: 102dvh;
    background: rgba(0,0,0,0.7); z-index: 99999;
    /* Default hidden. JS will set display: flex */
    display: none; 
    align-items: start; justify-content: center;
    /* Fix Mobile Scroll */
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior: contain;
    overflow-y: auto;
    padding-top: 20px; padding-bottom: 30px;
}
.py-pay-container {
    background: #fff; width: 95%; max-width: 800px;
    border-radius: 12px; 
    /* Scroll Fix */
    max-height: calc(100% - 40px); /* Reduce height slightly to allow address bar clearance */
    display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    margin-top: auto; margin-bottom: auto;
    animation: pyFadeIn 0.3s ease;
    /* Ensure content inside scrolls smoothly */
    overflow: hidden; 
}
@media (max-width: 768px) {
    .py-pay-overlay {
        padding-top: 20px !important; /* Reduced from 60px */
        align-items: flex-start !important;
    }
    .py-pay-container {
        max-height: calc(100% - 40px) !important;
    }
}
@keyframes pyFadeIn { from{opacity:0;transform:scale(0.95);} to{opacity:1;transform:scale(1);} }

.py-pay-header {
    background: #2563eb; color: #fff; padding: 0px 25px;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0; /* Header stays fixed */
}
.py-pay-header h3 { margin: 0; font-size: 18px; font-weight: 600; color: #fff; }
.py-pay-header button { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 22px; cursor: pointer; padding: 0; line-height: 1; }
.py-pay-header button:hover { color: #fff; }

.py-pay-body { padding: 0; min-height: 250px; overflow-y: auto; /* Scrollable Body */ }

/* Grid */
.py-pay-grid { display: flex; flex-direction: column-reverse; } /* QR (Right) First on Mobile */
@media(min-width: 600px) {
    .py-pay-grid { flex-direction: row; } /* Info (Left) First on Desktop */
}

/* Cols */
.py-pay-col-left { flex: 1.2; padding: 25px; border-bottom: none; border-top: 1px solid #eee; }
.py-pay-col-right { width: 100%; padding: 25px; background: #f9fafb; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: none; }

@media(min-width: 600px) {
    .py-pay-col-left { border-bottom: none; border-top: none; }
    .py-pay-col-right { width: 380px; border-left: 1px solid #eee; }
}

/* Boxes */
.py-alert-box { background: #fffbeb; border: 1px solid #fcd34d; color: #b45309; padding: 12px; border-radius: 6px; font-size: 14px; margin-bottom: 20px; }
.py-info-box { padding: 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.py-info-box.gray { background: #f1f5f9; border: 1px solid #e2e8f0; }
.py-info-box.blue { background: #eff6ff; border: 1px solid #dbeafe; margin-bottom: 0; }

.py-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.py-row:last-child { margin-bottom: 0; }
.py-row .label { color: #64748b; font-weight: 500; }
.py-row .value { font-weight: 600; color: #1e293b; font-size: 15px; }
.py-row .value.highlight { color: #2563eb; font-family: monospace; font-size: 16px; letter-spacing: 0.5px; }
.py-row .value.price { color: #dc2626; font-size: 18px; }
.py-row .value.code { color: #0891b2; font-family: monospace; font-size: 16px; letter-spacing: 1px; }
.py-row .text-upper { text-transform: uppercase; }

/* Copy Button */
.py-copy-group { display: flex; align-items: center; gap: 8px; }
.py-btn-copy { background: #fff; border: 1px solid #cbd5e1; color: #475569; padding: 4px 10px; font-size: 12px; border-radius: 4px; cursor: pointer; text-transform: uppercase; font-weight: 600; transition: all 0.2s;line-height: 0px; }
.py-btn-copy:hover { border-color: #3b82f6; color: #3b82f6; }

/* QR */
.py-qr-title { margin: 0 0 15px; font-weight: 600; color: #333; font-size: 15px; }
.py-qr-frame { padding: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.py-qr-frame img { display: block; width: 320px; height: 320px; }
.py-status-text { text-align: center; font-size: 13px; color: #64748b; line-height: 1.5; }
.py-spinner-sm { display: inline-block; width: 12px; height: 12px; border: 2px solid #cbd5e1; border-top-color: #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 5px; }

/* Loading/Success */
#py-payment-loading { padding: 80px; text-align: center; }
.py-spinner-lg { width: 50px; height: 50px; border: 4px solid #e2e8f0; border-top-color: #3b82f6; border-radius: 50%; margin: 0 auto 24px; animation: spin 1s linear infinite; }
.py-success-icon { width: 70px; height: 70px; background: #22c55e; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 35px; margin: 0 auto 20px; box-shadow: 0 10px 30px rgba(34,197,94,0.3); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Flash Timer */
.py-flash-timer {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: #d97706; background: #fffbeb;
    padding: 2px 8px; border-radius: 4px;
    border: 1px solid #fcd34d;
    width: fit-content; margin-top: 4px;
}
.py-flash-icon { font-size: 10px; animation: flash 1.5s infinite; }
.py-flash-text { color: #b45309; }
.py-flash-countdown { font-family: monospace; letter-spacing: 0.5px; }

@keyframes flash { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* [NEW] Flash Sale Card Border Effect */
.py-is-flash-sale {
    border: 1px solid #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
    position: relative;
    overflow: hidden;
}
.py-is-flash-sale::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-25deg);
    animation: pyCardShine 3s infinite;
    pointer-events: none;
    z-index: 10;
}
@keyframes pyCardShine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Nút bấm Gradient hiện đại */
.py-popup-btn {
    background: linear-gradient(135deg, #d53369 0%, #daae51 100%); /* Màu cam vàng nổi bật */
    /* Hoặc dùng màu MoMo: background: linear-gradient(135deg, #ec008c, #673ab7); */
    
    border: none;
    color: white;
    padding: 3px 24px!important;
    font-size: 16px;
    font-weight: 700; /* Chữ đậm */
    border-radius: 50px; /* Bo tròn hình viên thuốc */
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(213, 51, 105, 0.4); /* Đổ bóng phát sáng */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
    position: relative;
    overflow: hidden;
    animation: pulse-animation 2s infinite; /* Hiệu ứng nhịp tim */
}

/* Hiệu ứng khi di chuột vào (Bay lên nhẹ) */
.py-popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(213, 51, 105, 0.6);
}

/* Hiệu ứng khi bấm xuống */
.py-popup-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(213, 51, 105, 0.4);
}

/* Định nghĩa hiệu ứng nhịp tim thu hút mắt */
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(213, 51, 105, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(213, 51, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(213, 51, 105, 0); }
}
