/**
 * Nagdos E-İmza Sağ Kenara Sıfır Dikey Orta Tanıtım Sekmesi & Ultra-Görsel Kartı
 */

.nagdos-eimza-promo-wrapper {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    font-family: 'Kanit', sans-serif;
    user-select: none;
}

/* Sayfa e-imza landing sayfası ise otomatik gizle */
body.is-eimza-landing .nagdos-eimza-promo-wrapper {
    display: none !important;
}

/* -------------------------------------------------------------
   1. TETİKLEYİCİ SEKME (VARSAYILAN GÖRÜNÜM - SAĞA SIFIR, DİKEY ORTA)
   ------------------------------------------------------------- */
.nagdos-eimza-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 32, 0.98) 0%, rgba(14, 14, 18, 0.99) 100%);
    border: 1px solid rgba(255, 77, 77, 0.55);
    border-right: none;
    padding: 10px 18px 10px 22px;
    border-radius: 16px 0 0 16px;
    box-shadow: -8px 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(211, 47, 46, 0.4);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: visible;
}

.nagdos-eimza-tab:hover {
    transform: translateX(-7px);
    border-color: rgba(255, 77, 77, 0.95);
    box-shadow: -12px 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 77, 77, 0.6);
}

/* Shimmer Işık Geçişi */
.nagdos-eimza-tab__shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    border-radius: 16px 0 0 16px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    animation: tabShimmer 3.8s infinite;
    pointer-events: none;
}

@keyframes tabShimmer {
    0% { left: -100%; }
    30%, 100% { left: 100%; }
}

/* Sola Ok Kulpu (Handle) */
.nagdos-eimza-tab__handle {
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2e 0%, #ff4d4d 100%);
    border: 2px solid #141416;
    box-shadow: 0 0 14px rgba(255, 77, 77, 0.8), -3px 0 10px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 11px;
    z-index: 3;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: handleNudgeLeft 1.8s ease-in-out infinite;
}

/* Kulp arkasındaki hafif nabız dalgası (Ping Ring) */
.nagdos-eimza-tab__handle-ping {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255, 77, 77, 0.75);
    animation: handlePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes handlePing {
    0% { transform: scale(0.9); opacity: 0.9; }
    75%, 100% { transform: scale(1.5); opacity: 0; }
}

@keyframes handleNudgeLeft {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-50%) translateX(-4px);
    }
}

.nagdos-eimza-tab:hover .nagdos-eimza-tab__handle {
    background: linear-gradient(135deg, #b71c1c 0%, #ff5252 100%);
    box-shadow: 0 0 22px rgba(255, 77, 77, 1), -5px 0 14px rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) translateX(-6px);
}

/* 3D USB Token Önizleme Kutusu */
.nagdos-eimza-tab__token-preview {
    position: relative;
    width: 44px;
    height: 40px;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(211, 47, 46, 0.3) 0%, rgba(18, 18, 22, 0.85) 80%);
    border: 1px solid rgba(255, 77, 77, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 12px rgba(211, 47, 46, 0.35), 0 4px 12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.nagdos-eimza-tab__token-img {
    width: 38px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 77, 77, 0.5));
    animation: tabTokenFloat 3s ease-in-out infinite;
}

@keyframes tabTokenFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-2px) rotate(1deg); }
}

.nagdos-eimza-tab__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.nagdos-eimza-tab__text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.nagdos-eimza-tab__badge {
    background: linear-gradient(90deg, #d32f2e 0%, #ff4d4d 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(211, 47, 46, 0.5);
}

/* -------------------------------------------------------------
   2. GENİŞLETİLMİŞ KART (ULTRA-GÖRSEL SHOWCASE)
   ------------------------------------------------------------- */
.nagdos-eimza-card {
    display: none;
    position: relative;
    width: 335px;
    background: linear-gradient(160deg, rgba(24, 24, 28, 0.98) 0%, rgba(13, 13, 15, 0.99) 100%);
    border: 1px solid rgba(255, 77, 77, 0.45);
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    padding: 20px 22px 22px 22px;
    box-shadow: -15px 20px 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(211, 47, 46, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ortam Işığı */
.nagdos-eimza-card__ambient-light {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(211, 47, 46, 0.35) 0%, rgba(211, 47, 46, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Üst Kısım: Rozet & Kapat Butonu */
.nagdos-eimza-card__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.nagdos-eimza-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ff5252;
    background: rgba(211, 47, 46, 0.16);
    border: 1px solid rgba(211, 47, 46, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
}

.nagdos-eimza-card__badge i {
    font-size: 11px;
}

.nagdos-eimza-card__close {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
    width: 28px;
    height: 28px;
}

.nagdos-eimza-card__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

/* -------------------------------------------------------------
   3. BÜYÜK GÖRSEL VİTRİNİ (TOKEN SHOWCASE STAGE)
   ------------------------------------------------------------- */
.nagdos-eimza-card__showcase {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 140px;
    background: radial-gradient(ellipse at center, rgba(211, 47, 46, 0.25) 0%, rgba(20, 20, 24, 0.8) 75%);
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: inset 0 0 25px rgba(211, 47, 46, 0.2);
}

/* Siber Halkalar */
.nagdos-eimza-card__token-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255, 77, 77, 0.35);
    pointer-events: none;
}

.nagdos-eimza-card__token-ring--outer {
    width: 180px;
    height: 180px;
    animation: ringRotate 25s linear infinite;
}

.nagdos-eimza-card__token-ring--inner {
    width: 120px;
    height: 120px;
    border-style: solid;
    border-color: rgba(255, 77, 77, 0.25);
    box-shadow: 0 0 20px rgba(211, 47, 46, 0.3);
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nagdos-eimza-card__token-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.nagdos-eimza-card__token-img {
    width: 155px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 15px rgba(255, 77, 77, 0.4));
    animation: floatTokenHero 3.5s ease-in-out infinite;
}

@keyframes floatTokenHero {
    0%, 100% {
        transform: translateY(0px) rotate(-1deg);
    }
    50% {
        transform: translateY(-5px) rotate(1deg);
    }
}

.nagdos-eimza-card__official-pill {
    position: absolute;
    bottom: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(14, 14, 16, 0.85);
    border: 1px solid rgba(255, 77, 77, 0.4);
    padding: 2px 9px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nagdos-eimza-card__official-pill i {
    color: #ff4d4d;
}

/* -------------------------------------------------------------
   4. DETAYLAR, ÖZELLİKLER & FİYAT
   ------------------------------------------------------------- */
.nagdos-eimza-card__details {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.nagdos-eimza-card__title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.nagdos-eimza-card__title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    letter-spacing: 0.2px;
}

.nagdos-eimza-card__rating {
    font-size: 11px;
    font-weight: 700;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.12);
    padding: 2px 7px;
    border-radius: 6px;
}

/* 3'lü Özellik Rozetleri */
.nagdos-eimza-card__feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.nagdos-eimza-card__feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nagdos-eimza-card__feature-item:hover {
    background: rgba(211, 47, 46, 0.12);
    border-color: rgba(211, 47, 46, 0.35);
}

.nagdos-eimza-card__feature-item i {
    color: #ff5252;
    font-size: 13px;
    margin-bottom: 3px;
}

.nagdos-eimza-card__feature-item span {
    color: #cccccc;
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.15;
}

/* Fiyat Alanı */
.nagdos-eimza-card__pricing-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(30, 30, 36, 0.8) 0%, rgba(20, 20, 24, 0.9) 100%);
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
}

.nagdos-eimza-card__pricing-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nagdos-eimza-card__old-price {
    font-size: 11px;
    color: #888888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nagdos-eimza-card__old-price del {
    color: #999999;
    text-decoration: line-through;
}

.nagdos-eimza-card__current-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.nagdos-eimza-card__current-price strong {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.nagdos-eimza-card__curr {
    font-size: 14px;
    font-weight: 700;
    color: #ff5252;
}

.nagdos-eimza-card__current-price small {
    font-size: 10px;
    color: #aaaaaa;
    margin-left: 4px;
}

.nagdos-eimza-card__discount-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d32f2e 0%, #b71c1c 100%);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(211, 47, 46, 0.4);
}

.nagdos-eimza-card__discount-badge span {
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.nagdos-eimza-card__discount-badge small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* -------------------------------------------------------------
   5. SHIMMER PARLAMA EFEKTLİ CTA BUTONU
   ------------------------------------------------------------- */
.nagdos-eimza-card__btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    background: linear-gradient(135deg, #d32f2e 0%, #ff4d4d 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(211, 47, 46, 0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.nagdos-eimza-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(211, 47, 46, 0.75);
    background: linear-gradient(135deg, #b71c1c 0%, #ff5252 100%);
    color: #fff !important;
}

.nagdos-eimza-card__btn i {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.nagdos-eimza-card__btn:hover i {
    transform: translateX(4px);
}

/* Shimmer Animasyonu */
.nagdos-eimza-card__btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: btnShimmer 3.2s infinite;
}

@keyframes btnShimmer {
    0% { left: -100%; }
    40%, 100% { left: 100%; }
}

/* -------------------------------------------------------------
   6. AÇIK/KAPALI DURUM YÖNETİMİ
   ------------------------------------------------------------- */
.nagdos-eimza-promo-wrapper .nagdos-eimza-card {
    display: none;
}
.nagdos-eimza-promo-wrapper .nagdos-eimza-tab {
    display: flex;
}

.nagdos-eimza-promo-wrapper.is-open .nagdos-eimza-card {
    display: block;
}
.nagdos-eimza-promo-wrapper.is-open .nagdos-eimza-tab {
    display: none;
}

/* -------------------------------------------------------------
   7. MOBİL VE TABLET UYUMLULUK
   ------------------------------------------------------------- */
@media (max-width: 767px) {
    .nagdos-eimza-card {
        width: min(315px, calc(100vw - 20px));
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px 16px 16px;
        border-radius: 16px 0 0 16px;
    }

    .nagdos-eimza-card__ambient-light {
        width: 150px;
        height: 150px;
    }

    .nagdos-eimza-card__showcase {
        height: 115px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .nagdos-eimza-card__token-img {
        width: 125px;
    }

    .nagdos-eimza-card__token-ring--outer {
        width: 140px;
        height: 140px;
    }

    .nagdos-eimza-card__token-ring--inner {
        width: 95px;
        height: 95px;
    }

    .nagdos-eimza-card__title {
        font-size: 14.5px;
    }

    .nagdos-eimza-card__feature-grid {
        gap: 4px;
        margin-bottom: 12px;
    }

    .nagdos-eimza-card__feature-item {
        padding: 5px 2px;
    }

    .nagdos-eimza-card__feature-item i {
        font-size: 11px;
    }

    .nagdos-eimza-card__feature-item span {
        font-size: 8.5px;
    }

    .nagdos-eimza-card__current-price strong {
        font-size: 19px;
    }

    .nagdos-eimza-card__btn {
        padding: 11px 14px;
        font-size: 12.5px;
    }

    .nagdos-eimza-card__close {
        width: 32px;
        height: 32px;
        font-size: 17px;
    }

    /* Mobilde Küçültülmüş Sekme */
    .nagdos-eimza-tab {
        padding: 8px 12px 8px 16px;
        border-radius: 14px 0 0 14px;
        gap: 8px;
    }

    .nagdos-eimza-tab__handle {
        left: -13px;
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .nagdos-eimza-tab__token-preview {
        width: 38px;
        height: 34px;
        border-radius: 8px;
    }

    .nagdos-eimza-tab__token-img {
        width: 32px;
    }

    .nagdos-eimza-tab__text {
        font-size: 12.5px;
    }

    .nagdos-eimza-tab__badge {
        font-size: 8.5px;
        padding: 2px 6px;
    }
}

/* Küçük Ekranlı Telefonlar (iPhone SE, Galaxy A serisi vb. < 380px) */
@media (max-width: 380px) {
    .nagdos-eimza-card {
        width: calc(100vw - 12px);
        padding: 12px 14px 14px 14px;
    }

    .nagdos-eimza-card__showcase {
        height: 100px;
    }

    .nagdos-eimza-card__token-img {
        width: 110px;
    }

    .nagdos-eimza-tab__text {
        font-size: 11.5px;
    }

    .nagdos-eimza-tab {
        padding: 7px 10px 7px 14px;
    }
}
