/**
 * Icon System Styles
 * Professional SVG icon system for League of Legends Guide website
 * Replaces emoji with consistent, styleable SVG icons
 *
 * Version: 1.0
 * Created: 2025-11-15
 */

/* ============================================
   BASE ICON CLASS
   ============================================ */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    stroke: currentColor;
    flex-shrink: 0; /* Prevent icons from shrinking in flex containers */
}

/* Icons that use fill instead of stroke */
.icon[fill="currentColor"] {
    stroke: none;
}

/* Icons that use stroke instead of fill */
.icon[fill="none"] {
    fill: none;
}


/* ============================================
   SIZE VARIANTS
   ============================================ */

.icon-xs {
    width: 12px;
    height: 12px;
}

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

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

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

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

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


/* ============================================
   FUNCTIONAL COLOR VARIANTS
   ============================================ */

/* Visibility system colors */
.icon-private {
    color: #f44336; /* Red - Private/Locked */
}

.icon-public {
    color: #4caf50; /* Green - Public/Open */
}

.icon-twitch {
    color: #9146ff; /* Twitch Purple */
}

/* Status/Notification colors */
.icon-success {
    color: #4caf50; /* Green - Success */
}

.icon-warning {
    color: #ff9800; /* Orange - Warning */
}

.icon-error {
    color: #f44336; /* Red - Error */
}

/* Generic utility colors */
.icon-red {
    color: #f44336;
}

.icon-green {
    color: #4caf50;
}

.icon-purple {
    color: #9146ff;
}

.icon-orange {
    color: #ff9800;
}

.icon-blue {
    color: #2196f3;
}

.icon-gray {
    color: #666666;
}

.icon-white {
    color: #ffffff;
}


/* ============================================
   SOCIAL PLATFORM BRAND COLORS
   ============================================ */

.icon-discord {
    color: #5865F2; /* Discord Blurple */
}

.icon-tiktok {
    color: #000000; /* TikTok Black */
}

.icon-facebook {
    color: #1877F2; /* Facebook Blue */
}

.icon-youtube {
    color: #FF0000; /* YouTube Red */
}

.icon-x {
    color: #000000; /* X (Twitter) Black */
}

.icon-instagram {
    color: #E4405F; /* Instagram Pink/Purple */
}

.icon-reddit {
    color: #FF4500; /* Reddit Orange-Red */
}

.icon-linkedin {
    color: #0A66C2; /* LinkedIn Blue */
}


/* ============================================
   CONTEXT-SPECIFIC CLASSES
   ============================================ */

/* Visibility icons (lock, globe, twitch-glitch) */
.visibility-icon {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Star/Favorite icons with hover effects */
.star-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.star-icon:hover {
    transform: scale(1.2);
}

/* Star icon in favorite state (filled) */
.star-icon.favorited {
    color: #ff9800; /* Orange/Gold */
}

/* Star icon in unfavorited state (empty) */
.star-icon.unfavorited {
    color: #cccccc; /* Light gray */
}

.star-icon.unfavorited:hover {
    color: #ff9800; /* Orange on hover */
}

/* Status/Notification icons (success, warning, error) */
.status-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Social platform icons */
.social-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Empty state icons (large, centered, muted) */
.empty-state-icon {
    width: 64px;
    height: 64px;
    opacity: 0.4;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================
   INTERACTION STATES
   ============================================ */

/* Clickable icons */
.icon-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-clickable:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

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

/* Disabled icons */
.icon-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Focus states for accessibility */
.icon:focus,
.icon-clickable:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}


/* ============================================
   ICON BUTTON COMBOS
   ============================================ */

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

.icon-with-label .icon {
    flex-shrink: 0;
}

/* Icon badge (icon with count/number) */
.icon-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    font-size: 0.9em;
}

.icon-badge .icon {
    width: 14px;
    height: 14px;
}


/* ============================================
   SPECIAL USE CASES
   ============================================ */

/* Icons in buttons */
button .icon {
    margin-right: 6px;
}

button .icon-only {
    margin-right: 0;
}

/* Icons in form inputs */
input[type="text"] + .icon,
input[type="email"] + .icon,
input[type="password"] + .icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Icons in dropdown options */
select .icon,
option .icon {
    margin-right: 8px;
}


/* ============================================
   ANIMATION UTILITIES
   ============================================ */

/* Spinning animation (for loading states) */
@keyframes icon-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Pulse animation (for notifications) */
@keyframes icon-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Slightly smaller icons on mobile */
@media (max-width: 768px) {
    .visibility-icon {
        width: 14px;
        height: 14px;
    }

    .star-icon {
        width: 16px;
        height: 16px;
    }

    .status-icon {
        width: 18px;
        height: 18px;
    }

    .social-icon {
        width: 18px;
        height: 18px;
    }

    .empty-state-icon {
        width: 48px;
        height: 48px;
    }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Ensure icons are not read by screen readers when decorative */
.icon[aria-hidden="true"] {
    pointer-events: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .icon {
        stroke-width: 2;
    }

    .icon-private,
    .icon-error {
        color: #d32f2f; /* Darker red for better contrast */
    }

    .icon-public,
    .icon-success {
        color: #388e3c; /* Darker green for better contrast */
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .icon,
    .icon-clickable,
    .star-icon,
    .social-icon {
        transition: none;
    }

    .icon-spin,
    .icon-pulse {
        animation: none;
    }
}


/* ============================================
   DARK MODE SUPPORT (Future Enhancement)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .icon-gray {
        color: #aaaaaa; /* Lighter gray for dark backgrounds */
    }

    .icon-white {
        color: #ffffff;
    }

    /* Adjust icon badge background for dark mode */
    .icon-badge {
        background: rgba(255, 255, 255, 0.1);
    }
}
