/* Gift Styles */

/* In-post gifts */
.post-gifts {
    display: flex;
    flex-wrap: nowrap;
    /* Side by side only */
    gap: 4px;
    margin-right: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.post-gifts::-webkit-scrollbar {
    display: none;
}

.gift-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    /* Don't shrink labels */
}

.gift-badge span {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 700;
}

.gift-badge-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.icon-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: 0.2s;
}

.icon-action-btn:hover {
    color: var(--accent-color);
}

.gift-icon {
    width: 20px;
    height: 20px;
}

/* Gift selection modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    /* Slides from bottom */
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gift-modal {
    background: #111111;
    width: 100%;
    max-width: 500px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid var(--glass-border);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay.active .gift-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 16px;
}

.gift-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.gift-option:active {
    transform: scale(0.95);
    border-color: var(--accent-color);
}

.gift-emoji {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.gift-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.inline-star {
    width: 14px;
    height: 14px;
    filter: none;
}

/* Global Gift Notification */
.global-gift-container {
    position: fixed;
    top: 160px;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 990;
    display: flex;
    justify-content: center;
}

.global-toast {
    position: absolute;
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backdrop-filter: blur(12px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
    opacity: 0;
    transform: translateX(100vw);
    height: 32px;
    /* Fixed height for perfect thinness */
    white-space: nowrap;
}

.global-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.global-toast.hide {
    opacity: 0;
    transform: translateX(-100vw);
}

.global-toast-text {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.global-toast-highlight {
    color: var(--accent-color);
    font-weight: 700;
}

.global-toast-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}