/* Standardized SVG Icon System */

/* Base Icon Styles */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: currentColor;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
    color: inherit;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icon Sizes */
.icon-xs {
    width: 16px;
    height: 16px;
}

.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-md {
    width: 24px;
    height: 24px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 40px;
    height: 40px;
}

.icon-2xl {
    width: 48px;
    height: 48px;
}

/* Icon Colors */
.icon-primary {
    color: var(--text-primary, #111827);
}

.icon-secondary {
    color: var(--text-secondary, #64748b);
}

.icon-muted {
    color: var(--text-muted, #9ca3af);
}

.icon-accent {
    color: var(--accent-color, #3b82f6);
}

.icon-success {
    color: var(--success-color, #10b981);
}

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

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

.icon-info {
    color: var(--info-color, #3b82f6);
}

/* Icon Containers */
.icon-circle {
    padding: 8px;
    background-color: var(--bg-secondary, #f8fafc);
    border-radius: 50%;
}

.icon-square {
    padding: 8px;
    background-color: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
}

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

.icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background-color: var(--danger-color, #ef4444);
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon Animations */
.icon-spin {
    animation: icon-spin 2s linear infinite;
}

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

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

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

.icon-bounce {
    animation: icon-bounce 1s ease infinite;
}

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

/* Icon Groups */
.icon-group {
    display: inline-flex;
    align-items: center;
}

.icon-group .icon + .icon {
    margin-left: -8px;
}

/* Icon with Text */
.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Icon Button */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border-color, #e2e8f0);
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background-color: var(--surface-hover, rgba(0, 0, 0, 0.05));
    color: var(--text-primary, #111827);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn-sm {
    width: 32px;
    height: 32px;
}

.icon-btn-lg {
    width: 48px;
    height: 48px;
}

/* Icon in Components */
.card-icon,
.header-icon,
.nav-icon,
.btn-icon,
.alert-icon,
.form-icon,
.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.card-icon svg,
.header-icon svg,
.nav-icon svg,
.btn-icon svg,
.alert-icon svg,
.form-icon svg,
.menu-icon svg {
    width: 100%;
    height: 100%;
    color: inherit;
}

/* Specific Component Icon Styles */
.card-icon {
    color: var(--accent-color, #3b82f6);
}

.header-icon {
    color: var(--accent-color, #3b82f6);
}

.nav-icon {
    color: var(--text-secondary, #64748b);
}

.btn-icon {
    color: inherit;
}

.alert-icon {
    color: inherit;
}

.form-icon {
    color: var(--text-secondary, #64748b);
}

.menu-icon {
    color: var(--text-secondary, #64748b);
}

/* Dark Mode Icon Styles */
.dark-mode .icon-primary {
    color: var(--text-primary, #f9fafb);
}

.dark-mode .icon-secondary {
    color: var(--text-secondary, #94a3b8);
}

.dark-mode .icon-muted {
    color: var(--text-muted, #64748b);
}

.dark-mode .icon-circle,
.dark-mode .icon-square {
    background-color: var(--bg-secondary, #1e293b);
}

.dark-mode .icon-btn {
    color: var(--text-secondary, #94a3b8);
    border-color: var(--border-color, #475569);
}

.dark-mode .icon-btn:hover {
    background-color: var(--surface-hover, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #f9fafb);
}

.dark-mode .card-icon {
    color: var(--accent-color, #60a5fa);
}

.dark-mode .header-icon {
    color: var(--accent-color, #60a5fa);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .icon-spin,
    .icon-pulse,
    .icon-bounce {
        animation: none !important;
    }
}
