/* ========================================
   Tria Marketing — Frontend CSS
   ======================================== */

/* ------- SOSYAL KANIT BİLDİRİMLERİ ------- */
.tria-sp-notification {
    position: fixed;
    z-index: 99999;
    max-width: 340px;
    padding: 14px 18px 14px 14px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    cursor: pointer;
}

.tria-sp-notification.position-bottom-left {
    bottom: 24px;
    left: 24px;
}

.tria-sp-notification.position-bottom-right {
    bottom: 24px;
    right: 24px;
    transform: translateX(100%);
}

.tria-sp-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.tria-sp-notification .sp-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tria-sp-notification .sp-close:hover {
    color: #fff;
}

.tria-sp-notification .sp-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tria-sp-notification .sp-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.tria-sp-notification .sp-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.tria-sp-notification .sp-icon.order {
    background: rgba(37, 211, 102, 0.15);
}

.tria-sp-notification .sp-icon.stock {
    background: rgba(255, 107, 53, 0.15);
}

.tria-sp-notification .sp-icon.review {
    background: rgba(255, 193, 7, 0.15);
}

.tria-sp-notification .sp-text strong {
    display: block;
    color: #fff;
    margin-bottom: 2px;
}

.tria-sp-notification .sp-text small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.tria-sp-notification .sp-stars {
    color: #ffc107;
    font-size: 12px;
    letter-spacing: 1px;
}

/* ------- WHATSAPP FLOATING BUTONU ------- */
.tria-wa-floating {
    position: fixed;
    z-index: 99998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.tria-wa-floating.position-right {
    bottom: 24px;
    right: 24px;
}

.tria-wa-floating.position-left {
    bottom: 24px;
    left: 24px;
}

.tria-wa-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.tria-wa-floating svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* Floating baloncuk mesajı */
.tria-wa-bubble {
    position: fixed;
    z-index: 99997;
    background: #fff;
    color: #2c2c2c;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    max-width: 220px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid #e8e8e8;
}

.tria-wa-bubble.position-right {
    bottom: 92px;
    right: 24px;
}

.tria-wa-bubble.position-left {
    bottom: 92px;
    left: 24px;
}

.tria-wa-bubble.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tria-wa-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.tria-wa-bubble.position-right::after {
    right: 30px;
}

.tria-wa-bubble.position-left::after {
    left: 30px;
}

.tria-wa-bubble .bubble-close {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

/* ------- WHATSAPP ÜRÜN SAYFASI BUTONU ------- */
.tria-wa-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    clear: both;
}

.tria-wa-product-btn:hover {
    background: #1da851;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.tria-wa-product-btn svg {
    fill: #fff;
}

/* ------- WHATSAPP SEPET BUTONU ------- */
.tria-wa-cart-btn {
    display: block;
    text-align: center;
    background: #25D366;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.tria-wa-cart-btn:hover {
    background: #1da851;
}

/* ------- MOBİL RESPONSIVE ------- */
@media (max-width: 768px) {
    .tria-sp-notification {
        max-width: calc(100vw - 32px);
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        font-size: 12px;
    }

    .tria-wa-floating {
        width: 52px;
        height: 52px;
        bottom: 16px !important;
    }

    .tria-wa-floating.position-right {
        right: 16px;
    }

    .tria-wa-floating.position-left {
        left: 16px;
    }

    .tria-wa-bubble {
        bottom: 76px !important;
        max-width: 180px;
    }
}

/* ------- ÇARK ÇEVİR POPUP ------- */
#tria-spin-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#tria-spin-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90vw;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: spinModalIn 0.4s ease;
}

@keyframes spinModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#tria-spin-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
}

#tria-spin-title {
    font-size: 24px;
    margin: 0 0 8px;
    font-family: inherit;
}

#tria-spin-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 20px;
}

#tria-spin-wheel-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#tria-spin-canvas {
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.15), 0 0 30px rgba(0, 0, 0, 0.2);
}

#tria-spin-pointer {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    color: #FF6B6B;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

#tria-spin-form {
    display: flex;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}

#tria-spin-email {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

#tria-spin-email::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#tria-spin-email:focus {
    border-color: #4ECDC4;
}

#tria-spin-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #FF6B6B, #ee5a24);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

#tria-spin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
}

#tria-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#tria-spin-result {
    margin-top: 20px;
    padding: 16px;
    background: rgba(78, 205, 196, 0.15);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

#tria-spin-result .coupon-code {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 20px;
    background: #4ECDC4;
    color: #1a1a2e;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
}

@media (max-width: 480px) {
    #tria-spin-modal {
        padding: 20px;
    }

    #tria-spin-canvas {
        width: 240px;
        height: 240px;
    }

    #tria-spin-form {
        flex-direction: column;
    }
}