/* ===== HANDCRAFTED ICON SYSTEM ===== */
/* Professional SVG-based icons with consistent styling */

:root {
    --icon-size-sm: 1rem;
    --icon-size-md: 1.5rem;
    --icon-size-lg: 2rem;
    --icon-size-xl: 3rem;
    --icon-color: currentColor;
    --icon-weight: 2;
}

/* Icon base styles */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size-md);
    height: var(--icon-size-md);
    flex-shrink: 0;
}

.icon-sm {
    --icon-size-md: var(--icon-size-sm);
}

.icon-lg {
    --icon-size-md: var(--icon-size-lg);
}

.icon-xl {
    --icon-size-md: var(--icon-size-xl);
}

/* Icon SVG styling */
.icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--icon-color);
    stroke-width: var(--icon-weight);
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icon filled variant */
.icon.filled svg {
    fill: var(--icon-color);
}

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

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

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

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

/* Individual icon definitions using CSS data URIs */

/* Home Icon */
.icon-home svg {
    stroke-width: 1.5;
}

/* Dashboard Icon */
.icon-dashboard svg {
    stroke-width: 1.5;
}

/* Events Icon */
.icon-events svg {
    stroke-width: 1.5;
}

/* Challenges Icon */
.icon-challenges svg {
    stroke-width: 1.5;
}

/* User Icon */
.icon-user svg {
    stroke-width: 1.5;
}

/* Settings Icon */
.icon-settings svg {
    stroke-width: 1.5;
}

/* Logout Icon */
.icon-logout svg {
    stroke-width: 1.5;
}

/* Responsive icon sizing */
@media (max-width: 640px) {
    .icon {
        --icon-size-md: 1.25rem;
    }
}

/* Icon text alignment */
.icon-with-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon button variations */
.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    --icon-color: currentColor;
}

.icon-button:hover {
    background: rgba(102, 126, 234, 0.1);
    --icon-color: #667eea;
}

.icon-button:active {
    background: rgba(102, 126, 234, 0.2);
}

/* Icon color variations */
.icon-primary {
    --icon-color: #667eea;
}

.icon-success {
    --icon-color: #10b981;
}

.icon-warning {
    --icon-color: #f59e0b;
}

.icon-danger {
    --icon-color: #ef4444;
}

.icon-muted {
    --icon-color: #9ca3af;
}

/* Icon in badge */
.badge .icon {
    margin-right: 0.25rem;
}

/* Icon loading state */
.icon-loading {
    --icon-color: #667eea;
}

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