/* MEO Bayram Popup - frontend styles
 * Tema CSS'ini aşmak için ID + !important kullanılıyor.
 */
#mbp-overlay.mbp-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset: 0 !important;
    background: rgba(20, 30, 25, 0.65) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 20px !important;
    margin: 0 !important;
    opacity: 0;
    transition: opacity 0.25s ease;
    box-sizing: border-box !important;
}
#mbp-overlay.mbp-overlay.mbp-show {
    display: flex !important;
    opacity: 1;
}

#mbp-overlay .mbp-modal {
    position: relative !important;
    background: #fff !important;
    width: 100% !important;
    max-width: 900px !important;
    max-height: 92vh !important;
    overflow: auto !important;
    border-radius: 14px !important;
    box-shadow: 0 30px 70px rgba(0,0,0,0.35) !important;
    display: flex !important;
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease;
    box-sizing: border-box !important;
}
#mbp-overlay.mbp-show .mbp-modal {
    transform: translateY(0) scale(1);
}

#mbp-overlay .mbp-close {
    position: absolute !important;
    top: 10px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    background: rgba(255,255,255,0.92) !important;
    border: none !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    font-size: 26px !important;
    line-height: 1 !important;
    color: #2c3e2c !important;
    cursor: pointer !important;
    z-index: 5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    transition: transform 0.15s ease;
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    box-sizing: border-box !important;
}
#mbp-overlay .mbp-close:hover { transform: rotate(90deg); }

#mbp-overlay .mbp-media {
    flex: 0 0 45% !important;
    background-size: cover !important;
    background-position: center !important;
    background-color: #eef2ec !important;
    min-height: 280px !important;
    position: relative !important;
    order: 1 !important;
}
#mbp-overlay .mbp-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    visibility: hidden !important;
}

#mbp-overlay .mbp-content {
    flex: 1 1 55% !important;
    padding: 32px 30px !important;
    font-family: inherit !important;
    color: #2c3e2c !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    order: 2 !important;
    box-sizing: border-box !important;
}
#mbp-overlay .mbp-content--full { flex: 1 1 100% !important; }

.mbp-eyebrow {
    font-size: 14px;
    letter-spacing: 1px;
    color: #b08a45;
    font-style: italic;
    text-align: center;
    font-weight: 500;
}

.mbp-block { padding-bottom: 6px; }
.mbp-block + .mbp-block {
    border-top: 1px dashed #d8d8c8;
    padding-top: 14px;
    margin-top: 4px;
}
.mbp-block--bacs {
    background: #f6f4ea;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 8px;
}
.mbp-block--bacs + .mbp-block,
.mbp-block + .mbp-block--bacs {
    border-top: none;
}
.mbp-bacs-icon {
    margin-right: 4px;
}

.mbp-block-title {
    margin: 0 0 6px;
    font-size: 22px;
    color: #2c3e2c;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 700;
}

.mbp-percent {
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    color: #2c3e2c;
    line-height: 1;
    margin: 6px 0 4px;
}
.mbp-percent span {
    display: inline-block;
    margin-left: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    vertical-align: middle;
    color: #6a7d4f;
}
.mbp-percent--bacs { color: #6a7d4f; }

.mbp-text {
    font-size: 14px;
    line-height: 1.55;
    color: #4a5a4a;
    text-align: center;
}
.mbp-text p { margin: 0 0 8px; }
.mbp-text p:last-child { margin-bottom: 0; }

.mbp-coupon {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: 6px auto 4px;
    max-width: 320px;
}
.mbp-coupon-code {
    flex: 1;
    background: #fdf6e8;
    border: 2px dashed #d09a68;
    border-right: none;
    color: #2c3e2c;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    padding: 12px 14px;
    text-align: center;
    border-radius: 6px 0 0 6px;
    user-select: all;
}
.mbp-copy-btn {
    background: #2c3e2c;
    color: #fff;
    border: none;
    padding: 0 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    transition: background 0.15s;
}
.mbp-copy-btn:hover { background: #1c2e1c; }
.mbp-copy-btn.mbp-copied { background: #6a8a4f; }

.mbp-coupon-note,
.mbp-bacs-note,
.mbp-auto-note {
    font-size: 12px;
    color: #7a7a6a;
    text-align: center;
    margin: 0;
}
.mbp-auto-note {
    color: #6a8a4f;
    font-weight: 600;
}

#mbp-overlay .mbp-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 8px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}
#mbp-overlay .mbp-btn {
    padding: 12px 22px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    border: 1px solid transparent !important;
    transition: transform 0.1s ease, background 0.15s, color 0.15s, border-color 0.15s;
    box-sizing: border-box !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}
#mbp-overlay .mbp-btn:hover { transform: translateY(-1px); }
#mbp-overlay .mbp-btn--primary {
    background: #d09a68 !important;
    color: #fff !important;
    border-color: #d09a68 !important;
}
#mbp-overlay .mbp-btn--primary:hover { background: #b88454 !important; border-color: #b88454 !important; color: #fff !important; }
#mbp-overlay .mbp-btn--ghost {
    background: #fff !important;
    color: #2c3e2c !important;
    border-color: #d0d0c0 !important;
}
#mbp-overlay .mbp-btn--ghost:hover { background: #f6f4ea !important; border-color: #b8b8a8 !important; }

/* Mobile */
@media (max-width: 768px) {
    #mbp-overlay .mbp-modal {
        flex-direction: column !important;
        max-width: 100% !important;
    }
    #mbp-overlay .mbp-media {
        flex: 0 0 auto !important;
        min-height: 180px !important;
        height: 200px !important;
    }
    #mbp-overlay .mbp-content {
        padding: 24px 20px 22px !important;
    }
    #mbp-overlay .mbp-block-title { font-size: 20px; }
    #mbp-overlay .mbp-percent { font-size: 26px; }
    #mbp-overlay .mbp-coupon { max-width: 100%; }
    #mbp-overlay .mbp-coupon-code { font-size: 16px; padding: 10px; }
    #mbp-overlay .mbp-actions { flex-direction: column !important; }
    #mbp-overlay .mbp-btn { width: 100% !important; text-align: center !important; }
}

/* ============== Confetti + Congrats Toast (auto-coupon) ============== */
.mbp-confetti {
    position: fixed;
    inset: 0;
    z-index: 999998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mbp-confetti.mbp-confetti--show { opacity: 1; }

.mbp-confetti-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.mbp-conf-p {
    position: absolute;
    top: -20px;
    display: block;
    border-radius: 2px;
    opacity: 0.95;
    animation-name: mbp-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}
@keyframes mbp-fall {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0.85; }
}

.mbp-confetti-card {
    position: absolute;
    left: 50%;
    top: 28%;
    transform: translate(-50%, -50%) scale(0.85);
    background: #fff;
    color: #2c3e2c;
    padding: 18px 28px;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    max-width: 90%;
    line-height: 1.4;
    border: 2px solid #c9a55e;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mbp-confetti--show .mbp-confetti-card {
    transform: translate(-50%, -50%) scale(1);
}
.mbp-confetti-msg strong { color: #6a8a4f; }

@media (max-width: 768px) {
    .mbp-confetti-card {
        font-size: 15px;
        padding: 14px 20px;
        top: 25%;
    }
}

/* ============== Debug Bar (admin-only) ============== */
.mbp-debug-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999997;
    background: #1e1e2e;
    color: #f1f1f1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    border-top: 2px solid #d09a68;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
    max-height: 50vh;
    overflow-y: auto;
}
.mbp-debug-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #181825;
    border-bottom: 1px solid #313244;
}
.mbp-debug-head strong { color: #d09a68; }
.mbp-debug-page {
    background: #313244;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}
.mbp-debug-spacer { flex: 1; }
.mbp-debug-toggle {
    background: #313244;
    color: #fff;
    border: none;
    width: 26px;
    height: 22px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1;
}
.mbp-debug-body { padding: 12px 14px; }
.mbp-debug-collapsed .mbp-debug-body { display: none; }

.mbp-debug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 18px;
    margin-bottom: 10px;
}
.mbp-debug-grid > div {
    padding: 4px 0;
    border-bottom: 1px dotted #313244;
}
.mbp-debug-grid b { color: #a6adc8; font-weight: 500; }
.mbp-debug-grid code {
    background: #313244;
    color: #f9e2af;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
}
.mbp-dbg-y { color: #a6e3a1; font-weight: 600; }
.mbp-dbg-n { color: #f38ba8; font-weight: 600; }
.mbp-dbg-warn { color: #f9e2af; font-weight: 600; }

.mbp-debug-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #313244;
}
.mbp-debug-actions .button {
    background: #313244 !important;
    color: #f1f1f1 !important;
    border: 1px solid #45475a !important;
    box-shadow: none !important;
    padding: 4px 10px !important;
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 11px !important;
    text-shadow: none !important;
}
.mbp-debug-actions .button:hover {
    background: #45475a !important;
    color: #d09a68 !important;
    border-color: #d09a68 !important;
}

@media (max-width: 600px) {
    .mbp-debug-bar { font-size: 11px; }
    .mbp-debug-grid { grid-template-columns: 1fr; }
}

/* Toast for copy success */
.mbp-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2c3e2c;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 1000000;
}
.mbp-toast.mbp-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
