/**
 * Hediye Çarkı Popup & Fiyat Hesaplayıcı Stilleri
 * TokatWeb - Dönüşüm Optimizasyonu
 */

/* ========================================
   HEDİYE ÇARKI POPUP
   ======================================== */

#spinPopupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#spinPopupOverlay.show {
    opacity: 1;
    visibility: visible;
}

.spin-popup-content {
    background: linear-gradient(145deg, #1e1b4b, #312e81);
    border-radius: 25px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(99, 102, 241, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#spinPopupOverlay.show .spin-popup-content {
    transform: scale(1);
}

.spin-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spin-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.spin-popup-icon {
    font-size: 4em;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.spin-popup-content h2 {
    color: #fff;
    font-size: 2em;
    margin: 15px 0 10px;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.spin-popup-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.spin-popup-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.spin-popup-prizes span {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.9em;
}

.spin-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.spin-popup-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

.spin-popup-note {
    margin-top: 20px;
    color: #ef4444;
    font-size: 0.9em;
    animation: blink 1s ease infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================
   FİYAT HESAPLAYICI WİDGET
   ======================================== */

#priceCalcWidget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.calc-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.calc-toggle i {
    font-size: 1.3em;
}

.calc-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 350px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.calc-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.calc-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-header h4 {
    margin: 0;
    font-size: 1em;
}

.calc-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0.8;
}

.calc-close:hover {
    opacity: 1;
}

.calc-body {
    padding: 20px;
}

.calc-step {
    display: none;
}

.calc-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.calc-step p {
    margin: 0 0 15px;
    font-weight: 600;
    color: #1f2937;
}

.calc-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.calc-options button {
    padding: 15px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.calc-options button:hover {
    background: #e5e7eb;
    border-color: #6366f1;
    transform: translateY(-2px);
}

/* Sonuç */
.calc-result {
    text-align: center;
}

.result-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.calc-result h3 {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 1em;
}

.result-price {
    font-size: 2.5em;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 10px;
}

.result-note {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 15px;
}

.result-discount {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.discount-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-discount p {
    margin: 5px 0;
    color: #92400e;
    font-size: 0.9em;
}

.discount-code {
    background: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    margin: 5px 0;
    font-family: monospace;
}

.discount-code strong {
    color: #6366f1;
    font-size: 1.1em;
}

.discount-timer {
    color: #dc2626;
    font-size: 0.85em;
    margin-top: 8px;
    animation: blink 1s ease infinite;
}

.result-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.result-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* ========================================
   TELEFON FLOATING BUTTON
   ======================================== */

#phoneFloatBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 25px rgba(16, 185, 129, 0.4);
    z-index: 9997;
    transition: all 0.3s ease;
    animation: phonePulse 2s ease infinite;
}

@keyframes phonePulse {
    0%, 100% { box-shadow: 0 5px 25px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 5px 35px rgba(16, 185, 129, 0.6); }
}

#phoneFloatBtn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: scale(1.05);
}

#phoneFloatBtn i {
    font-size: 1.5em;
    display: inline-block;
    vertical-align: middle;
}

.result-whatsapp i {
    font-size: 1.3em;
    display: inline-block;
    vertical-align: middle;
}

/* ========================================
   SOSYAL KANIT TOAST
   ======================================== */

.social-proof-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #fff;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 320px;
    z-index: 9996;
    animation: slideIn 0.5s ease;
    border-left: 4px solid #10b981;
}

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

.social-proof-toast .toast-icon {
    width: 50px;
    height: 50px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.social-proof-toast .toast-content {
    flex: 1;
}

.social-proof-toast .toast-content strong {
    display: block;
    color: #1f2937;
    margin-bottom: 3px;
}

.social-proof-toast .toast-content small {
    color: #6b7280;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2em;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .spin-popup-content {
        padding: 30px 20px;
    }
    
    .spin-popup-content h2 {
        font-size: 1.5em;
    }
    
    #priceCalcWidget {
        right: 10px;
        bottom: 80px;
    }
    
    .calc-panel {
        width: 300px;
        right: -10px;
    }
    
    #phoneFloatBtn span {
        display: none;
    }
    
    #phoneFloatBtn {
        padding: 15px;
        border-radius: 50%;
    }
    
    .social-proof-toast {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

