/**
 * ChessStake - Unified Icon System
 * Using inline SVG icons for consistency and flexibility
 * All icons are 24x24 by default, scalable via font-size
 */

/* Base icon styles */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

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

/* Icon sizes */
.icon-xs { font-size: 0.75rem; }
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.25rem; }
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 2rem; }
.icon-2xl { font-size: 2.5rem; }
.icon-3xl { font-size: 3rem; }

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

.icon-text .icon {
    flex-shrink: 0;
}

/* Icon button wrapper */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-md, 8px);
    transition: all 0.2s ease;
    color: inherit;
}

.icon-btn:hover {
    background: var(--color-bg-tertiary, rgba(0,0,0,0.05));
}

/* Specific icon color modifiers */
.icon-success { color: #22c55e; }
.icon-error { color: #ef4444; }
.icon-warning { color: #f59e0b; }
.icon-info { color: #0ea5e9; }
.icon-muted { color: var(--color-text-tertiary, #9ca3af); }
.icon-primary { color: var(--color-accent-primary, #7c3aed); }

/* Animated icons */
.icon-spin {
    animation: icon-spin 1s linear infinite;
}

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

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

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

/* Chess piece icons (not board pieces) */
.chess-icon {
    font-family: 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Sans Symbols', sans-serif;
    font-style: normal;
    line-height: 1;
}
