/**
 * Fun Features CSS - Resto M2
 * Faz 5: Eğlenceli Özellikler Stilleri
 */

/* ============================================
   Fun Modal Base
   ============================================ */

.fun-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fun-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.fun-modal-content {
    position: relative;
    width: 90%;
    max-width: 420px;
    padding: 35px;
    background: #fff;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: modalPop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPop {
    from {
        transform: scale(0.7) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.fun-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f1f3f5;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fun-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.fun-modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
}

.fun-modal-content p {
    font-size: 15px;
    color: #6c757d;
    margin: 0 0 25px;
}

/* ============================================
   Spin Wheel (Döndür Kazandır)
   ============================================ */

.spin-wheel-modal .fun-modal-content {
    max-width: 450px;
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 25px;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #e74c3c;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15),
        inset 0 0 0 8px #fff,
        inset 0 0 0 12px #e74c3c;
    overflow: hidden;
    transform: rotate(0deg);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    left: 50%;
    top: 0;
    transform-origin: 0% 100%;
    transform: rotate(var(--rotation)) skew(45deg);
    background: var(--color);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.segment-text {
    position: absolute;
    top: 20%;
    left: 10%;
    transform: skew(-45deg) rotate(-20deg);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.spin-btn {
    padding: 16px 45px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spin-result {
    margin-top: 20px;
    min-height: 60px;
}

.winner-announcement {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    animation: winnerPulse 0.5s ease;
}

@keyframes winnerPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.winner-announcement .confetti {
    font-size: 28px;
    margin: 0 10px;
}

.view-winner-btn {
    margin-top: 15px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-winner-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   Quiz
   ============================================ */

.quiz-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 25px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 18px !important;
    font-weight: 500;
    color: #2c3e50 !important;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 24px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: #667eea;
    background: #f0f2ff;
    transform: translateX(5px);
}

/* Quiz Result */
.quiz-result-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.quiz-result-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.quiz-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-result-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.result-item-name {
    font-weight: 600;
    color: #2c3e50;
}

.result-item-price {
    font-weight: 700;
    color: #e74c3c;
}

/* ============================================
   Mood Selector
   ============================================ */

.mood-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mood-btn:hover {
    border-color: #ffc107;
    background: #fffbeb;
    transform: scale(1.05);
}

.mood-emoji {
    font-size: 32px;
}

.mood-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

/* ============================================
   Event Banner
   ============================================ */

.event-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.event-banner .event-icon {
    font-size: 28px;
}

.event-banner .event-content {
    flex: 1;
}

.event-banner .event-content strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.event-banner .event-content span {
    font-size: 13px;
    opacity: 0.9;
}

.event-banner .event-offer {
    display: block;
    margin-top: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 12px;
    width: fit-content;
}

.event-banner .event-dismiss {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* ============================================
   Trigger Buttons (can be added via shortcode)
   ============================================ */

.fun-trigger-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.fun-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fun-trigger-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.fun-trigger-btn .trigger-icon {
    font-size: 18px;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .fun-modal-content {
        padding: 25px 20px;
        max-width: 95%;
    }

    .wheel-container {
        width: 240px;
        height: 240px;
    }

    .mood-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-option {
        padding: 14px 18px;
        font-size: 14px;
    }

    .fun-trigger-bar {
        flex-wrap: wrap;
    }
}