/**
 * Elementor Image Carousel Widget - Styles
 */

/* Wrapper */
.eic-wrapper {
    width: 100%;
}

/* Icons Row */
.eic-icons-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

/* Icon Item */
.eic-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    padding-bottom: 8px;

    /* Border styling - inactive state (transparent) */
    border-style: solid;
    --border-style: solid;
    border-width: 0px 0px 4px 0px;
    --border-top-width: 0px;
    --border-right-width: 0px;
    --border-bottom-width: 4px;
    --border-left-width: 0px;
    border-color: transparent;
    --border-color: transparent;
}

/* Icon Item - Active state */
.eic-icon-item.active {
    border-color: var(--e-global-color-accent, #FFD700);
    --border-color: var(--e-global-color-accent, #FFD700);
}

/* Icon Item - Hover state */
.eic-icon-item:hover {
    cursor: pointer;
}

/* Icon Image Container */
.eic-icon-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eic-icon-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* Icon Title */
.eic-icon-title {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
}

/* Chevron */
.eic-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    align-self: center;
    padding-bottom: 30px; /* Align with icon images, accounting for title height */
}

.eic-chevron i {
    font-size: 24px;
    color: #333333;
    transition: color 0.3s ease;
}

.eic-chevron svg {
    width: 24px;
    height: 24px;
    fill: #333333;
    transition: fill 0.3s ease;
}

/* Content Area */
.eic-content-area {
    position: relative;
    margin-top: 30px;
    min-height: 100px;
    overflow: hidden;
    transition: height 0.3s ease;
}

/* Text Item */
.eic-text-item {
    display: none;
    opacity: 0;
    padding: 20px;
}

/* Text Item - Active state */
.eic-text-item.active {
    display: block;
    opacity: 1;
}

/* Content Heading */
.eic-content-heading {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
}

/* Content Text */
.eic-content-text {
    margin-top: 15px;
}

.eic-content-text ul {
    margin: 0;
    padding-left: 20px;
}

.eic-content-text li {
    margin-bottom: 8px;
}

.eic-content-text li:last-child {
    margin-bottom: 0;
}

/* Focus states for accessibility */
.eic-icon-item:focus {
    outline: 2px solid var(--e-global-color-accent, #FFD700);
    outline-offset: 4px;
}

.eic-icon-item:focus:not(:focus-visible) {
    outline: none;
}

.eic-icon-item:focus-visible {
    outline: 2px solid var(--e-global-color-accent, #FFD700);
    outline-offset: 4px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .eic-icons-row {
        gap: 8px;
    }

    .eic-icon-image img {
        width: 80px;
        height: 80px;
    }

    .eic-icon-title {
        font-size: 12px;
    }

    .eic-chevron {
        width: 30px;
        padding-bottom: 25px;
    }

    .eic-chevron i {
        font-size: 18px;
    }

    .eic-chevron svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .eic-icons-row {
        flex-wrap: wrap;
        gap: 15px;
    }

    .eic-icon-item {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }

    .eic-chevron {
        display: none;
    }

    .eic-icon-image img {
        width: 70px;
        height: 70px;
    }

    .eic-icon-title {
        font-size: 11px;
    }

    .eic-content-heading {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .eic-icon-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .eic-icon-image img {
        width: 60px;
        height: 60px;
    }

    .eic-icon-title {
        font-size: 10px;
    }

    .eic-content-heading {
        font-size: 16px;
    }

    .eic-text-item {
        padding: 15px;
    }
}

/* Editor Preview Styles */
.elementor-editor-active .eic-text-item {
    /* Show all items in editor for easy editing, but keep visual indication */
}

.elementor-editor-preview .eic-text-item:not(.active) {
    display: none;
}
