/**
 * IW Animated Tabs Widget Styles
 */

.iw-animated-tabs-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    align-items: flex-start;
    width: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.iw-animated-tabs-widget.loaded {
    opacity: 1;
}

/* Tab Navigation Container */
.iw-tabs-nav {
    display: flex;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    /* Background, padding, border-radius, and box-shadow are now controlled by Elementor */
    background-color: #ffffff;
    padding: 10px;
    border-radius: 60px;
}

/* Animated Indicator */
.iw-tabs-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    height: 100%;
    background-color: #6633FF;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-50%);
    z-index: 0;
    opacity: 1;
    pointer-events: none;
}

/* Tab Buttons */
.iw-tab-button {
    position: relative;
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    transition: color 0.3s ease;
    border-radius: 50px;
    z-index: 1;
    white-space: nowrap;
    outline: none;
}

.iw-tab-button:hover {
    color: #555555;
}

.iw-tab-button.active {
    color: #FFFFFF;
}

.iw-tab-button:focus {
    outline: none;
}

/* Tab Content */
.iw-tabs-content {
    position: relative;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    margin-top: 0;
    top: 0;
    width: 100%;
}

.iw-tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-in-out;
    position: relative;
    vertical-align: top;
    align-self: flex-start;
}

.iw-tab-pane.active {
    display: block;
}

.iw-tab-pane.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.iw-tab-pane.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Two Column Layout */
.iw-tab-columns {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.iw-tab-column {
    flex: 1;
}

.iw-tab-column-left {
    flex: 1;
}

.iw-tab-column-right {
    flex: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .iw-tabs-nav {
        justify-content: center;
    }
    
    .iw-tab-button {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .iw-tab-columns {
        flex-direction: column;
        gap: 20px;
    }
}

/* Mobile Styles - Vertical Stacking */
@media (max-width: 599px) {
    .iw-tabs-nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 10px;
        border-radius: 15px;
    }
    
    .iw-tab-button {
        font-size: 14px;
        padding: 15px 20px;
        text-align: center;
        border-radius: 10px;
        margin: 0;
        width: 100%;
    }
    
    .iw-tabs-indicator {
        width: calc(100% - 20px) !important;
        height: auto;
        top: auto;
        left: 10px !important;
        transform: none;
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .iw-tab-columns {
        flex-direction: column;
        gap: 15px;
    }
}


/* Content Type Styles */
.iw-tab-pane img {
    max-width: 100%;
    height: auto;
    display: block;
}

.iw-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.iw-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Elementor Editor Compatibility */
.elementor-editor-active .iw-tab-pane {
    display: block;
    opacity: 1;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.elementor-editor-active .iw-tab-pane:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}