/* ============================================================
    PYTADO Discount Premium Frontend Stylesheet
    ============================================================ */
/* Local font loading — self-hosted fonts.
    Place WOFF2/WOFF files in `assets/fonts/` and update filenames in
    `assets/fonts/fonts.css` if needed. To use Google-hosted fonts instead,
    restore the original @import line above. */
@import url('./fonts/fonts.css');

:root {
    --bg-modal: #0d0d0d;
    --bg-card: #151515;
    --bg-card-hover: #1b1b1b;
    --border-color: rgba(201, 168, 76, 0.2);
    --border-color-hover: rgba(201, 168, 76, 0.45);
    
    --accent-gold: #c9a84c;
    --accent-gold-glow: rgba(201, 168, 76, 0.15);
    --gold-gradient: linear-gradient(135deg, #c9a84c 0%, #e5c158 50%, #a48130 100%);
    --dark-gradient: linear-gradient(135deg, #181818 0%, #101010 100%);
}

/* Custom Scrollbar for Premium Look */
.pytado-modal-body::-webkit-scrollbar {
    width: 6px;
}
.pytado-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}
.pytado-modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 8px;
    opacity: 0.5;
}
.pytado-modal-body::-webkit-scrollbar-thumb:hover {
    background: #e5c158;
}

/* Floating Gift Button Wrapper */
.pytado-float-wrap {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 99999;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.pytado-float-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-gradient);
    color: #000000;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Poppins', 'Be Vietnam Pro', 'Montserrat', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.2px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(201, 168, 76, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    animation: pytado-pulse 2.2s infinite;
}

/* Floating button text */
.pytado-gift-text {
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    color: inherit;
    text-transform: none;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.02);
}

.pytado-float-btn:hover {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.55);
}

.pytado-float-close {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4a4a;
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
    z-index: 100000;
}

.pytado-float-close:hover {
    transform: scale(1.2);
    background: #ff2a2a;
}

.pytado-gift-icon {
    font-size: 20px;
    animation: gift-wobble 2.5s infinite;
}

@keyframes gift-wobble {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(-10deg) scale(1.1); }
    30% { transform: rotate(10deg) scale(1.1); }
    45% { transform: rotate(-6deg); }
    60% { transform: rotate(6deg); }
    75% { transform: rotate(0); }
}

@keyframes pytado-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.6);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(201, 168, 76, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
    }
}

/* Modal Overlay */
.pytado-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pytado-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.pytado-modal-card {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    width: 92%;
    max-width: 520px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.85), 0 0 40px rgba(201, 168, 76, 0.05);
    overflow: hidden;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.pytado-modal-overlay.active .pytado-modal-card {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.pytado-modal-header {
    background: #141414;
    padding: 22px 26px 16px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pytado-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #ffffff, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pytado-modal-close {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #999;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.pytado-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Modern Tab Bar */
.pytado-modal-tabs {
    display: flex;
    background: #101010;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none; /* Hide for firefox */
}
.pytado-modal-tabs::-webkit-scrollbar {
    display: none; /* Hide for chrome/safari */
}

.pytado-tab-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pytado-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.pytado-tab-btn.active {
    color: #000;
    background: var(--gold-gradient);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.2);
}

.pytado-tab-btn .tab-count {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: bold;
}
.pytado-tab-btn.active .tab-count {
    background: rgba(0, 0, 0, 0.15);
}

/* Modal Body */
.pytado-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    background: radial-gradient(circle at bottom right, rgba(201, 168, 76, 0.03), transparent 60%);
}

.pytado-modal-subtitle {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: #777;
    line-height: 1.6;
}

/* Coupons List */
.pytado-coupons-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* PREMIUM TICKET STUB DESIGN */
.pytado-coupon-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    overflow: visible;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pytado-coupon-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    border-color: rgba(201, 168, 76, 0.15);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45), 0 0 15px rgba(201, 168, 76, 0.03);
}

/* Highlighted (Best Offer) Card */
.pytado-coupon-card.is-hot {
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(201, 168, 76, 0.06);
    background: linear-gradient(to right, #161616, #1a1a1a);
}

.pytado-coupon-card.is-hot:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 25px rgba(201, 168, 76, 0.12);
}

/* HOT / BEST Badges */
.coupon-hot-badge {
    position: absolute;
    top: -8px;
    right: 18px;
    background: var(--gold-gradient);
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(201, 168, 76, 0.3);
    z-index: 10;
}

/* Ticket Circle Stub Punchouts */
.pytado-coupon-card::before, .pytado-coupon-card::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--bg-modal); /* Matches the modal body */
    border-radius: 50%;
    left: 83px; /* Centers exactly on the border split */
    z-index: 12;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.3s ease;
}

.pytado-coupon-card::before {
    top: -8px;
    box-shadow: inset 0 -3px 3px rgba(0,0,0,0.5);
}

.pytado-coupon-card::after {
    bottom: -8px;
    box-shadow: inset 0 3px 3px rgba(0,0,0,0.5);
}

.coupon-left {
    width: 90px;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.09) 0%, rgba(201, 168, 76, 0.01) 100%);
    border-right: 2px dashed rgba(201, 168, 76, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    flex-shrink: 0;
    position: relative;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.coupon-icon-wrap {
    font-size: 20px;
    margin-bottom: 6px;
    opacity: 0.85;
}

.coupon-type-tag {
    color: var(--accent-gold);
    font-weight: 900;
    font-size: 15px;
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.15);
    text-align: center;
    line-height: 1.2;
}

.coupon-right {
    flex-grow: 1;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* Prevents overflow */
}

.coupon-code-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.coupon-code {
    font-family: 'Outfit', 'Courier New', Courier, monospace;
    font-weight: 800;
    color: #ffffff;
    font-size: 13.5px;
    background: #0d0d0d;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.pytado-coupon-card.is-hot .coupon-code {
    background: rgba(201, 168, 76, 0.04);
    border-color: rgba(201, 168, 76, 0.15);
}

.pytado-copy-btn {
    background: var(--gold-gradient);
    color: #000000;
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    box-shadow: 0 3px 8px rgba(201, 168, 76, 0.25);
    white-space: nowrap;
}

.pytado-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
}

.pytado-copy-btn.copied {
    animation: button-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes button-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.coupon-title {
    margin: 2px 0 0 0;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.coupon-details {
    margin-top: 2px;
}

.coupon-details ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coupon-details li {
    font-size: 11.5px;
    color: #909090;
    line-height: 1.5;
    position: relative;
    padding-left: 12px;
}

.coupon-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

.coupon-details strong {
    color: #ffffff;
    font-weight: 700;
}

/* Toast Alert */
.pytado-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #161616;
    border: 1px solid var(--accent-gold);
    color: #fff;
    padding: 15px 28px;
    border-radius: 50px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.6), 0 0 20px rgba(201, 168, 76, 0.1);
    font-weight: 700;
    font-size: 13.5px;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    pointer-events: none;
}

.pytado-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pytado-toast-icon {
    font-size: 18px;
}

/* ============================================================
   Mobile & Responsive Adjustments
   ============================================================ */
@media screen and (max-width: 480px) {
    .pytado-float-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .pytado-modal-card {
        width: 94%;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .pytado-modal-header {
        padding: 18px 20px 12px 20px;
    }
    
    .pytado-modal-body {
        padding: 18px;
    }
    
    .pytado-modal-tabs {
        padding: 4px 10px;
    }
    
    .pytado-tab-btn {
        padding: 6px 12px;
        font-size: 11.5px;
    }
    
    .pytado-coupon-card {
        flex-direction: column;
    }
    
    .pytado-coupon-card::before, .pytado-coupon-card::after {
        display: none; /* Hide stubs on mobile stacking */
    }
    
    .coupon-left {
        width: 100%;
        border-right: none;
        border-bottom: 2px dashed rgba(201, 168, 76, 0.2);
        padding: 14px 12px 10px 12px;
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
        border-top-right-radius: 14px;
        border-bottom-left-radius: 0;
    }
    
    .coupon-icon-wrap {
        margin-bottom: 0;
        font-size: 18px;
    }
    
    .coupon-type-tag {
        font-size: 14px;
    }
    
    .coupon-right {
        padding: 14px 16px;
    }
    
    .coupon-code-row {
        gap: 8px;
    }
    
    .coupon-code {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .pytado-copy-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .coupon-title {
        font-size: 14px;
    }
}

/* Mobile Adjustments for Floating Button */
@media (max-width: 768px) {
    .pytado-float-wrap {
        bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
        left: 15px !important;
    }
    .pytado-gift-text {
        display: none;
    }
    .pytado-float-btn {
        padding: 14px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
    .pytado-gift-icon {
        font-size: 26px;
        margin: 0;
    }
    .pytado-float-close {
        top: 0;
        right: 0;
    }
}

/* Desktop Adjustments for Floating Button - Icon only, expand on hover */
@media (min-width: 1024px) {
    .pytado-float-btn {
        width: 56px !important;
        height: 56px !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    
    .pytado-gift-text {
        max-width: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        padding: 0 !important;
        margin: 0 !important;
        display: inline-block;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2) !important;
    }
    
    .pytado-gift-icon {
        font-size: 26px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    }
    
    .pytado-float-wrap:hover .pytado-float-btn {
        width: auto !important;
        padding: 12px 24px !important;
        gap: 10px !important;
        border-radius: 50px !important;
    }
    
    .pytado-float-wrap:hover .pytado-gift-text {
        max-width: 200px !important;
        opacity: 1 !important;
        display: inline-block !important;
    }
    
    .pytado-float-wrap:hover .pytado-gift-icon {
        font-size: 20px !important;
    }
}
