/**
 * Insta Feed - Frontend Styles
 * Version 1.2.0 - Vertical Video Responsive
 */

/* Container */
.insta-feed-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Carousel Container */
.insta-feed-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.insta-feed-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.insta-feed-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slides */
.insta-feed-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.insta-feed-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Video Link */
.insta-feed-video-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

/* Video */
.insta-feed-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.insta-feed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.insta-feed-video-link:hover .insta-feed-overlay {
    background: rgba(22, 22, 63, 0.4);
}

.insta-feed-icon {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #fff;
    width: 60px;
    height: 60px;
}

.insta-feed-video-link:hover .insta-feed-icon {
    opacity: 1;
    transform: scale(1);
}

.insta-feed-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(19, 43, 80, 0.5));
}

/* Title - Outside Card - Fixed Height */
.insta-feed-container > .insta-feed-title {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    background: transparent;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    overflow: hidden;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    margin-top: 8px;
    box-sizing: border-box;
}

/* Navigation Arrows */
.insta-feed-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none !important;
    border-radius: 50%;
    background: #132b50 !important;
    background-color: #132b50 !important;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease, transform 0.3s ease;
    padding: 0;
    outline: none !important;
    box-shadow: none !important;
}

.insta-feed-nav:hover,
.insta-feed-nav:focus,
.insta-feed-nav:active {
    background: #16163f !important;
    background-color: #16163f !important;
    color: #fff !important;
    transform: translateY(-50%) scale(1.1);
    outline: none !important;
    box-shadow: none !important;
}

.insta-feed-nav svg {
    width: 24px;
    height: 24px;
}

.insta-feed-prev {
    left: 10px;
}

.insta-feed-next {
    right: 10px;
}

/* Dots Indicator */
.insta-feed-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.insta-feed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
    outline: none;
    box-shadow: none;
}

.insta-feed-dot:hover {
    background: rgba(255, 255, 255, 0.8) !important;
}

.insta-feed-dot:focus {
    outline: none;
    box-shadow: none;
}

.insta-feed-dot.active {
    background: #fff !important;
    transform: scale(1.2);
}

/* Progress Bar */
.insta-feed-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(19, 43, 80, 0.3);
    z-index: 10;
}

.insta-feed-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #132b50, #16163f);
    transition: width 0.1s linear;
}

/* Empty State */
.insta-feed-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #666;
    font-size: 14px;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .insta-feed-container {
        max-width: 350px;
    }

    .insta-feed-carousel {
        border-radius: 10px;
    }

    .insta-feed-nav {
        width: 36px;
        height: 36px;
    }

    .insta-feed-nav svg {
        width: 20px;
        height: 20px;
    }

    .insta-feed-prev {
        left: 8px;
    }

    .insta-feed-next {
        right: 8px;
    }

    .insta-feed-icon {
        width: 48px;
        height: 48px;
    }

    .insta-feed-container > .insta-feed-title {
        font-size: 13px;
        height: 55px;
        min-height: 55px;
        max-height: 55px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .insta-feed-container {
        max-width: 300px;
    }

    .insta-feed-carousel {
        border-radius: 8px;
    }

    .insta-feed-nav {
        width: 32px;
        height: 32px;
    }

    .insta-feed-nav svg {
        width: 18px;
        height: 18px;
    }

    .insta-feed-icon {
        width: 40px;
        height: 40px;
    }

    .insta-feed-dot {
        width: 6px;
        height: 6px;
    }

    .insta-feed-container > .insta-feed-title {
        font-size: 12px;
        height: 50px;
        min-height: 50px;
        max-height: 50px;
        padding: 8px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 360px) {
    .insta-feed-container {
        max-width: 280px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.insta-feed-carousel.loaded {
    animation: fadeIn 0.5s ease;
}

/* Pause on hover indicator */
.insta-feed-carousel.paused .insta-feed-progress-bar {
    animation-play-state: paused;
}
