/**
 * Gift Info Tooltip Styles - TeslaServer Theme
 * استایل تولتیپ اطلاعات هدایا
 */

/* Gift Item Wrapper */
li.gift-info-item {
    position: relative;
    cursor: help;
    transition: all 0.3s ease;
    z-index: 1;
}

li.gift-info-item:hover {
    background: rgba(0, 128, 255, 0.05);
    border-radius: 4px;
    z-index: 99999;
}

/* Gift Tooltip Container */
.gift-info-tooltip {
    position: fixed;
    left: 50%;
    bottom: auto;
    top: auto;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(135deg, #0080FF 0%, #0066CC 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 128, 255, 0.4);
    min-width: 300px;
    max-width: 340px;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

/* Tooltip Arrow */
.gift-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #0066CC;
    z-index: 1;
}

/* Show Tooltip on Hover */
.gift-info-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    pointer-events: auto;
}

/* Show below variant */
.gift-info-tooltip.show-below {
    transform: translateX(-50%) translateY(10px);
}

.gift-info-tooltip.show-below.active {
    transform: translateX(-50%) translateY(5px);
}

.gift-info-tooltip.show-below::after {
    top: auto;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: transparent;
    border-bottom-color: #0080FF;
    z-index: 1;
}

/* Tooltip Header */
.gift-info-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.gift-info-tooltip .tooltip-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    animation: giftBounce 2s infinite;
}

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

.gift-info-tooltip .tooltip-title {
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
}

/* Tooltip Description */
.gift-info-tooltip .tooltip-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

/* Gift Examples */
.gift-info-tooltip .gift-examples {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
}

.gift-info-tooltip .gift-examples-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    opacity: 0.9;
}

.gift-info-tooltip .gift-examples-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gift-info-tooltip .gift-examples-list li {
    font-size: 0.75rem;
    padding: 0.35rem 0;
    padding-right: 1.1rem;
    position: relative;
    line-height: 1.5;
}

.gift-info-tooltip .gift-examples-list li::before {
    content: '🎁';
    position: absolute;
    right: 0;
    font-size: 0.75rem;
}

/* Gift Badge - دوره بلند */
.gift-info-tooltip .gift-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.95);
    color: #212529;
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Tooltip Note - Important Message */
.gift-info-tooltip .tooltip-note {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    margin: 0.65rem 0 0.5rem 0;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #fff;
}

/* Tooltip Link */
.gift-info-tooltip .tooltip-link {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gift-info-tooltip .tooltip-link:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    text-decoration: none;
    transform: scale(1.02);
}

.gift-info-tooltip .tooltip-link i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

/* Pulse Animation */
@keyframes tooltipPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(0, 128, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 128, 255, 0.6);
    }
}

.gift-info-tooltip.active {
    animation: tooltipPulse 2s infinite;
}

/* Indicator Icon */
li.gift-info-item .fa-gift {
    transition: all 0.3s ease;
}

li.gift-info-item:hover .fa-gift {
    color: #0080FF !important;
    transform: scale(1.15);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .gift-info-tooltip {
        min-width: 260px;
        max-width: 90vw;
        padding: 0.65rem 0.85rem;
    }

    .gift-info-tooltip.active {
        transform: translateX(-50%) translateY(-5px);
    }
    
    .gift-info-tooltip.show-below.active {
        transform: translateX(-50%) translateY(5px);
    }

    .gift-info-tooltip .tooltip-header {
        font-size: 0.85rem;
    }

    .gift-info-tooltip .tooltip-desc,
    .gift-info-tooltip .tooltip-link {
        font-size: 0.75rem;
    }
    
    .gift-info-tooltip .gift-examples-list li {
        font-size: 0.7rem;
    }
}

/* RTL Support */
[dir="rtl"] .gift-info-tooltip .gift-examples-list li {
    padding-right: 0;
    padding-left: 1.1rem;
}

[dir="rtl"] .gift-info-tooltip .gift-examples-list li::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .gift-info-tooltip .tooltip-link i {
    margin-right: 0;
    margin-left: 0.3rem;
}

/* Better visibility for light backgrounds */
.gift-info-tooltip {
    backdrop-filter: blur(10px);
    transition-delay: 0.2s;
}

/* Smooth show/hide */
.gift-info-tooltip.active {
    transition-delay: 0s;
}

