/* ==================== SVG Icons Styling ==================== */

/* Icon Component Base */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

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

/* Icon Size Variants */
.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-md {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-lg {
    width: 2rem;
    height: 2rem;
}

.icon-xl {
    width: 2.5rem;
    height: 2.5rem;
}

/* Icon Color Variants */
.icon-primary {
    color: var(--color-accent);
}

.icon-success {
    color: var(--color-success);
}

.icon-warning {
    color: var(--color-warning);
}

.icon-danger {
    color: var(--color-danger);
}

.icon-text {
    color: var(--color-text);
}

.icon-text-secondary {
    color: var(--color-text-secondary);
}

.icon-white {
    color: #FFFFFF;
}

/* Icon Button Integration */
.btn .icon {
    margin-right: 0.5rem;
}

.btn .icon:last-child {
    margin-right: 0;
}

/* Navigation Item Icons */
.nav-item .icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.5rem;
}

/* Feature Card Icons */
.feature-card .icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

/* Icon Hover Effects */
.icon-hover:hover {
    color: var(--color-accent);
    transition: color 0.2s ease;
}

/* Animated Icons */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.icon-spin {
    animation: spin 1s linear infinite;
}

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

.icon-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Icon with Badge */
.icon-badge {
    position: relative;
}

.icon-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Icon Wrapper for Cards */
.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(0, 119, 204, 0.1);
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.icon-wrapper.primary {
    background: rgba(0, 119, 204, 0.1);
    color: var(--color-accent);
}

.icon-wrapper.success {
    background: rgba(46, 138, 58, 0.1);
    color: var(--color-success);
}

.icon-wrapper.warning {
    background: rgba(224, 168, 0, 0.1);
    color: var(--color-warning);
}

.icon-wrapper.danger {
    background: rgba(217, 83, 79, 0.1);
    color: var(--color-danger);
}

/* Dark Theme Icon Adjustments */
[data-theme='dark'] .icon-wrapper {
    background: rgba(0, 136, 221, 0.15);
}

[data-theme='dark'] .icon-wrapper.success {
    background: rgba(76, 175, 80, 0.15);
}

[data-theme='dark'] .icon-wrapper.warning {
    background: rgba(255, 179, 0, 0.15);
}

[data-theme='dark'] .icon-wrapper.danger {
    background: rgba(244, 67, 54, 0.15);
}
