/* Контейнер для карусели - ПРИМЕНЯЕМ НАСТРОЙКИ */
.tips-carousel-wrapper {
    position: fixed;
    z-index: 99999;
    max-width: 700px;
    width: 90%;
    pointer-events: none;
}

/* Позиционирование из настроек */
.tips-carousel-wrapper.position-top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
    transform: none;
}

.tips-carousel-wrapper.position-top-center {
    top: 20px;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translateX(-50%);
}

.tips-carousel-wrapper.position-top-right {
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
    transform: none;
}

.tips-carousel-wrapper.position-center-left {
    top: 50%;
    left: 20px;
    bottom: auto;
    right: auto;
    transform: translateY(-50%);
}

.tips-carousel-wrapper.position-center {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
}

.tips-carousel-wrapper.position-center-right {
    top: 50%;
    right: 20px;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
}

.tips-carousel-wrapper.position-bottom-left {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
    transform: none;
}

.tips-carousel-wrapper.position-bottom-center {
    bottom: 20px;
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
}

.tips-carousel-wrapper.position-bottom-right {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    transform: none;
}

/* Карусель */
.tips-carousel {
    position: relative;
    pointer-events: auto;
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 120px;
    display: flex;
    align-items: center;
}

/* Слайд */
.tip-slide {
    display: none !important;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.tip-slide.active {
    display: flex !important;
    gap: 20px;
    align-items: center;
}

/* Карусель */
.tips-carousel {
    position: relative;
    pointer-events: auto;
    background: transparent;
    border-radius: 16px;
    padding: 0 40px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Слайд - КВАДРАТНЫЙ */
.tip-slide {
    display: none;
    width: 250px;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease;
    flex-shrink: 0;
}

.tip-slide.active {
    display: block;
}

/* Медиа - фон */
.tip-slide .tip-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tip-slide .tip-media img,
.tip-slide .tip-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tip-slide .tip-media .no-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Затемнение */
.tip-slide .tip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
}

/* Контент поверх изображения */
.tip-slide .tip-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 3;
    color: #fff;
}

.tip-slide .tip-content .tip-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.tip-slide .tip-content .tip-title .badge-recommended {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
    font-size: 9px;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.tip-slide .tip-content .tip-text {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tip-slide .tip-content .tip-text p {
    margin: 0;
}

/* Действия - поверх изображения */
.tip-slide .tip-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    gap: 4px;
}

.tip-slide .tip-actions button {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(255,255,255,0.1);
}

.tip-slide .tip-actions .btn-like:hover {
    background: rgba(76, 175, 80, 0.6);
    transform: scale(1.05);
}

.tip-slide .tip-actions .btn-dislike:hover {
    background: rgba(244, 67, 54, 0.6);
    transform: scale(1.05);
}

.tip-slide .tip-actions .btn-close {
    background: rgba(0,0,0,0.5);
    font-size: 14px;
    padding: 4px 8px;
}

.tip-slide .tip-actions .btn-close:hover {
    background: rgba(244, 67, 54, 0.6);
    transform: scale(1.05);
}

.tip-slide .tip-actions .count {
    font-size: 11px;
}

/* Кнопки навигации */
.tips-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.tips-carousel .carousel-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.tips-carousel .carousel-btn.prev {
    left: 0;
}

.tips-carousel .carousel-btn.next {
    right: 0;
}

/* Индикаторы */
.tips-carousel .carousel-dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.tips-carousel .carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tips-carousel .carousel-dots .dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

.tips-carousel .carousel-dots .dot:hover {
    background: rgba(255,255,255,0.6);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.tips-carousel-wrapper {
    animation: slideUp 0.5s ease;
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .tips-carousel-wrapper {
        bottom: 15px;
        max-width: 96vw;
    }
    
    .tips-carousel {
        padding: 0 30px;
        min-height: 200px;
    }
    
    .tip-slide {
        width: 200px;
        height: 200px;
        border-radius: 12px;
    }
    
    .tip-slide .tip-content .tip-title {
        font-size: 14px;
    }
    
    .tip-slide .tip-content .tip-text {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    .tip-slide .tip-actions button {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .tips-carousel .carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}