/* ====================================
   SMARTCALCS PROFESSIONAL ICON SYSTEM
   Modern SVG Icons with Animations
   ==================================== */

:root {
    --icon-primary: #667eea;
    --icon-secondary: #764ba2;
    --icon-success: #10b981;
    --icon-warning: #f59e0b;
    --icon-error: #ef4444;
    --icon-size-sm: 24px;
    --icon-size-md: 32px;
    --icon-size-lg: 48px;
    --icon-size-xl: 64px;
}

/* Base Icon Container */
.smart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

.smart-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--icon-primary), var(--icon-secondary));
    opacity: 0.1;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.smart-icon:hover::before {
    opacity: 0.2;
}

.smart-icon svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.15));
}

.smart-icon:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 16px rgba(102, 126, 234, 0.25));
}

/* Icon Sizes */
.smart-icon--sm {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

.smart-icon--md {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
}

.smart-icon--lg {
    width: var(--icon-size-lg);
    height: var(--icon-size-lg);
}

.smart-icon--xl {
    width: var(--icon-size-xl);
    height: var(--icon-size-xl);
}

/* Specific Tool Icons */
.icon-gst-invoice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.icon-gst-calculator {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.icon-emi-calculator {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.icon-sip-calculator {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.icon-split-bill {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.icon-unit-converter {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.icon-compound-interest {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.icon-rent-vs-buy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Animation Classes */
.icon-bounce {
    animation: iconBounce 0.6s ease-in-out;
}

.icon-pulse {
    animation: iconPulse 2s infinite;
}

.icon-rotate {
    animation: iconRotate 0.5s ease-in-out;
}

@keyframes iconBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes iconRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Modern Professional Icons */
.professional-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.9;
}

.professional-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.professional-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.professional-icon:hover::after {
    width: 140%;
    height: 140%;
}

.professional-icon svg {
    width: 32px;
    height: 32px;
    z-index: 1;
    position: relative;
    fill: currentColor;
}

/* Tool-specific Professional Icons */
.prof-icon-gst-invoice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prof-icon-gst-calculator {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.prof-icon-emi-calculator {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.prof-icon-sip-calculator {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.prof-icon-split-bill {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.prof-icon-unit-converter {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.prof-icon-compound-interest {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.prof-icon-rent-vs-buy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .professional-icon {
        width: 50px;
        height: 50px;
    }
    
    .professional-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .smart-icon--xl {
        width: 48px;
        height: 48px;
    }
    
    .smart-icon--lg {
        width: 40px;
        height: 40px;
    }
}

/* Dark Theme Adjustments */
:root.dark {
    --icon-primary: #8b5cf6;
    --icon-secondary: #06b6d4;
}

.dark .professional-icon {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .professional-icon:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
