﻿/* ==========================================================================
   Kampanya bildirimi: sag dikey serit + sol alt zil + koyu yesil popup
   ========================================================================== */

:root {
    --q-promo-dark: #0b3d2e;
    --q-promo-green: #0f9d58;
    --q-promo-mint: #b9e3cc;
}

/* ---------- Sag kenar dikey serit ---------- */
.q-promo-tab {
    position: fixed;
    right: 0;
    top: 46%;
    z-index: 9400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border: 0;
    border-radius: 14px 0 0 14px;
    background: var(--q-promo-dark);
    color: #eafff4;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: -4px 8px 22px rgba(11, 61, 46, 0.4);
    animation: qPromoTabPulse 2.8s ease-in-out infinite;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.q-promo-tab:hover {
    transform: translateX(-3px);
    box-shadow: -8px 8px 28px rgba(11, 61, 46, 0.55);
}

.q-promo-tab:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.q-promo-tab-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    max-height: 46vh;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes qPromoTabPulse {
    0%, 100% { box-shadow: -4px 8px 22px rgba(11, 61, 46, 0.4); }
    50% { box-shadow: -6px 8px 30px rgba(20, 184, 102, 0.45); }
}

/* ---------- Sol alt zil ---------- */
.q-promo-bell {
    position: fixed;
    left: 20px;
    bottom: 24px;
    z-index: 9400;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--q-promo-dark);
    color: #eafff4;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(11, 61, 46, 0.42);
    animation: qPromoBellPulse 2.6s ease-in-out infinite;
    transition: transform 200ms ease;
}

.q-promo-bell:hover {
    transform: translateY(-2px) scale(1.05);
}

.q-promo-bell:focus-visible {
    outline: 2px solid var(--q-promo-dark);
    outline-offset: 3px;
}

.q-promo-bell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 0;
    animation: qPromoBellRing 4s ease-in-out infinite;
}

.q-promo-bell-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 11px;
    background: var(--q-promo-green);
    color: #06281c;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.q-promo-bell-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(20, 184, 102, 0.65);
    animation: qPromoBellPing 2.6s ease-out infinite;
    pointer-events: none;
}

@keyframes qPromoBellPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(11, 61, 46, 0.42); }
    50% { box-shadow: 0 8px 30px rgba(20, 184, 102, 0.5); }
}

@keyframes qPromoBellRing {
    0%, 86%, 100% { transform: rotate(0deg); }
    88% { transform: rotate(-14deg); }
    91% { transform: rotate(11deg); }
    94% { transform: rotate(-7deg); }
    97% { transform: rotate(3deg); }
}

@keyframes qPromoBellPing {
    0% { transform: scale(1); opacity: 0.85; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .q-promo-tab,
    .q-promo-bell,
    .q-promo-bell-icon,
    .q-promo-bell-ping {
        animation: none;
    }
}

/* ---------- Popup (koyu yesil) ---------- */
.q-promo-popup {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.q-promo-popup.is-open {
    display: flex;
}

.q-promo-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 24, 18, 0.55);
    backdrop-filter: blur(2px);
}

.q-promo-popup-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 26px 22px 20px;
    border-radius: 20px;
    background: var(--q-promo-dark);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    animation: qPromoPopupIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes qPromoPopupIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.q-promo-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #eafff4;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease;
}

.q-promo-popup-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.q-promo-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.q-promo-card {
    text-align: center;
}

.q-promo-card + .q-promo-card {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.q-promo-card-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-wrap: balance;
}

.q-promo-card-subtitle {
    margin-bottom: 14px;
    color: #ffe066;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* KOD kutusu: gorseldeki gibi beyaz zemin + koyu yesil kod */
.q-promo-code {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 16px 14px;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
    color: var(--q-promo-dark);
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.q-promo-code:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.q-promo-code:active {
    transform: translateY(0);
}

.q-promo-code-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.q-promo-code-label {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.q-promo-code-value {
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.06em;
    word-break: break-all;
}

.q-promo-code-hint {
    display: block;
    margin-top: 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #8aa79a;
}

.q-promo-code.is-copied {
    background: #e9fff3;
}

.q-promo-code.is-copied .q-promo-code-value,
.q-promo-code.is-copied .q-promo-code-hint {
    color: #0a7b3a;
}

/* Uygula butonu */
.q-promo-apply {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 13px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--q-promo-green);
    color: #06281c;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(20, 184, 102, 0.35);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.q-promo-apply:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(20, 184, 102, 0.45);
}

.q-promo-apply:disabled {
    opacity: 0.65;
    cursor: default;
    box-shadow: none;
}

.q-promo-card-note {
    margin: 12px 0 0;
    color: var(--q-promo-mint);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.q-promo-popup-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.q-promo-popup-finish {
    color: #8aa79a;
    font-size: 10.5px;
}

.q-promo-popup-cta {
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #eafff4;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 160ms ease;
}

.q-promo-popup-cta:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* ---------- Mobil ---------- */
@media (max-width: 768px) {
    .q-promo-tab {
        top: 42%;
        padding: 15px 10px;
        font-size: 10.5px;
    }

    .q-promo-tab-text {
        max-height: 38vh;
    }

    .q-promo-bell {
        left: 12px;
        bottom: 16px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .q-promo-bell-count {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .q-promo-popup {
        padding: 12px;
    }

    .q-promo-popup-dialog {
        padding: 22px 16px 16px;
        max-height: 92vh;
        border-radius: 16px;
    }

    .q-promo-card-title {
        font-size: 17px;
    }

    .q-promo-code {
        padding: 13px 12px;
    }

    .q-promo-code-label {
        font-size: 17px;
    }

    .q-promo-code-value {
        font-size: 18px;
    }
}
