/**
 * Epic Workflow Icons - Frontend Styles
 * Version: 1.0.0
 */

/* Icon Wrapper Base Styles */
.epic-icon-wrapper {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: 4px; /* Slight downward adjustment */
    line-height: 0;
    transition: all 0.3s ease;
}

.epic-icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Default color for currentColor */
.epic-icon-wrapper svg {
    color: #CE7E5E;
}

/* Alignment Options */
.epic-icon-align-inline {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: 4px;
}

.epic-icon-align-left {
    display: block;
    margin-right: auto;
}

.epic-icon-align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.epic-icon-align-right {
    display: block;
    margin-left: auto;
}

/* Practical Icons Style */
.epic-icon-practical svg {
    stroke-width: 1.5;
}

.epic-icon-practical:hover svg {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Styled Icons Style */
.epic-icon-styled svg {
    stroke-width: 2;
}

.epic-icon-styled {
    position: relative;
}

.epic-icon-styled::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: #CE7E5E;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.epic-icon-styled:hover::before {
    opacity: 0.1;
}

.epic-icon-styled:hover {
    transform: translateY(-2px);
}

/* Size Presets */
.epic-icon-small {
    width: 16px;
    height: 16px;
}

.epic-icon-medium {
    width: 24px;
    height: 24px;
}

.epic-icon-large {
    width: 48px;
    height: 48px;
}

.epic-icon-xlarge {
    width: 64px;
    height: 64px;
}

/* List Item Icons */
ul.epic-icon-list,
ol.epic-icon-list {
    list-style: none;
    padding-left: 0;
}

ul.epic-icon-list li,
ol.epic-icon-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
}

ul.epic-icon-list li .epic-icon-wrapper,
ol.epic-icon-list li .epic-icon-wrapper {
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 16px;
    height: 16px;
}

/* Button Icons */
.button .epic-icon-wrapper,
.btn .epic-icon-wrapper,
button .epic-icon-wrapper {
    margin-right: 8px;
    width: 1em;
    height: 1em;
    vertical-align: text-bottom;
}

.button .epic-icon-wrapper.epic-icon-after,
.btn .epic-icon-wrapper.epic-icon-after,
button .epic-icon-wrapper.epic-icon-after {
    margin-right: 0;
    margin-left: 8px;
}

/* Menu Icons */
.menu-item .epic-icon-wrapper,
.nav-item .epic-icon-wrapper,
.menu .epic-icon-wrapper,
nav .epic-icon-wrapper {
    margin-right: 6px;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

/* WordPress Admin Menu Icons */
#adminmenu .epic-icon-wrapper {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    vertical-align: text-top;
}

/* Menu icon specific styling */
.epic-icon-wrapper.menu-icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: text-top;
}

/* Mobile menu icon adjustments */
@media (max-width: 768px) {
    .mobile-menu .epic-icon-wrapper,
    .responsive-menu .epic-icon-wrapper {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
}

/* Animation Classes */
.epic-icon-spin {
    animation: epic-icon-spin 2s linear infinite;
}

.epic-icon-pulse {
    animation: epic-icon-pulse 2s ease-in-out infinite;
}

.epic-icon-bounce {
    animation: epic-icon-bounce 2s ease-in-out infinite;
}

@keyframes epic-icon-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes epic-icon-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes epic-icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .epic-icon-wrapper {
        max-width: 100%;
    }
    
    .epic-icon-responsive-small {
        width: 16px !important;
        height: 16px !important;
    }
    
    .epic-icon-responsive-hide {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .epic-icon-wrapper svg {
        filter: brightness(1.1);
    }
}

/* Grid Layout for Icon Galleries */
.epic-icon-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    padding: 20px;
}

.epic-icon-gallery-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.epic-icon-gallery-item:hover {
    background: #f5f5f5;
    border-color: #CE7E5E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.epic-icon-gallery-item .epic-icon-wrapper {
    margin: 0 auto 10px;
}

.epic-icon-gallery-item-name {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Accessibility */
.epic-icon-wrapper[aria-hidden="true"] {
    pointer-events: none;
}

.epic-icon-wrapper[role="img"] {
    speak: literal-punctuation;
}

/* Elementor Compatibility */
.elementor-widget-text-editor .epic-icon-wrapper,
.elementor-widget-heading .epic-icon-wrapper,
.elementor-widget-html .epic-icon-wrapper {
    display: inline-block;
    vertical-align: middle;
}

.elementor-heading-title .epic-icon-wrapper {
    margin-right: 10px;
}

/* Ensure icons work in Elementor's editor mode */
.elementor-editor-active .epic-icon-wrapper {
    pointer-events: none;
}

/* Print Styles */
@media print {
    .epic-icon-wrapper svg {
        color: #000 !important;
        filter: none !important;
    }
    
    .epic-icon-styled::before {
        display: none !important;
    }
}