/* Instagram Carousel Feed - Frontend Styles */

.icf-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.icf-carousel-wrapper {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.icf-carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.icf-carousel-item {
    flex: 0 0 auto;
    padding: 0 8px;
    box-sizing: border-box;
}

.icf-post-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 300px;
}

.icf-post-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.icf-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    position: relative;
}

.icf-media-image,
.icf-media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.icf-post-container:hover .icf-media-image,
.icf-post-container:hover .icf-media-thumbnail {
    transform: scale(1.05);
}

.icf-video-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.icf-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    pointer-events: none;
}

.icf-post-container:hover .icf-play-button {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.icf-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px 15px 15px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icf-post-container:hover .icf-post-overlay {
    opacity: 1;
}

.icf-caption {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.icf-timestamp {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* Navigation Arrows */
.icf-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.icf-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.icf-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.icf-arrow-prev {
    left: -20px;
}

.icf-arrow-next {
    right: -20px;
}

.icf-arrow svg {
    color: #333;
}

/* Dots Navigation */
.icf-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

.icf-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icf-dot:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.icf-dot.active {
    background: #007cba;
    transform: scale(1.3);
}

/* Error States */
.icf-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* Loading State */
.icf-loading {
    text-align: center;
    padding: 40px 20px;
}

.icf-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: icf-spin 1s linear infinite;
}

@keyframes icf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .icf-carousel-item {
        padding: 0 6px;
    }
    
    .icf-arrow-prev {
        left: -15px;
    }
    
    .icf-arrow-next {
        right: -15px;
    }
}

@media (max-width: 768px) {
    .icf-carousel-container {
        padding: 15px 0;
    }
    
    .icf-carousel-item {
        padding: 0 4px;
    }
    
    .icf-post-container {
        height: 250px;
    }
    
    .icf-arrow {
        width: 35px;
        height: 35px;
    }
    
    .icf-arrow-prev {
        left: -10px;
    }
    
    .icf-arrow-next {
        right: -10px;
    }
    
    .icf-play-button {
        width: 50px;
        height: 50px;
    }
    
    .icf-caption {
        font-size: 13px;
    }
    
    .icf-timestamp {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .icf-carousel-container {
        padding: 10px 0;
    }
    
    .icf-post-container {
        height: 200px;
    }
    
    .icf-arrow {
        width: 30px;
        height: 30px;
    }
    
    .icf-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .icf-play-button {
        width: 45px;
        height: 45px;
    }
    
    .icf-play-button svg {
        width: 20px;
        height: 20px;
    }
    
    .icf-post-overlay {
        padding: 15px 10px 10px;
    }
    
    .icf-caption {
        font-size: 12px;
    }
}

/* Accessibility */
.icf-arrow:focus,
.icf-dot:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
.icf-carousel-track.transitioning {
    transition: transform 0.3s ease-in-out;
}

/* Hide scrollbars */
.icf-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.icf-carousel-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* RTL Support */
[dir="rtl"] .icf-arrow-prev {
    right: -20px;
    left: auto;
}

[dir="rtl"] .icf-arrow-next {
    left: -20px;
    right: auto;
}

[dir="rtl"] .icf-arrow-prev svg {
    transform: scaleX(-1);
}

[dir="rtl"] .icf-arrow-next svg {
    transform: scaleX(-1);
}
