/**
 * Math Calculator Plugin Styles
 * Version: 1.0.0
 */

/* Main calculator result styles */
.math-calc-result {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    margin: 4px 0;
    position: relative;
    overflow: hidden;
}

.math-calc-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.math-calc-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.math-calc-result:hover::before {
    left: 100%;
}

/* Error message styles */
.math-calc-error {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    margin: 4px 0;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Calculator widget container */
.math-calc-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    max-width: 400px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.math-calc-widget h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

/* Input field styles */
.math-calc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.math-calc-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button styles */
.math-calc-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 4px;
    position: relative;
    overflow: hidden;
}

.math-calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.math-calc-button:active {
    transform: translateY(0);
}

.math-calc-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.math-calc-button:active::before {
    width: 300px;
    height: 300px;
}

/* Result display area */
.math-calc-display {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive design */
@media (max-width: 768px) {
    .math-calc-widget {
        margin: 10px;
        padding: 16px;
        max-width: none;
    }
    
    .math-calc-result,
    .math-calc-error {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .math-calc-button {
        padding: 10px 16px;
        font-size: 14px;
        width: 100%;
        margin: 4px 0;
    }
    
    .math-calc-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .math-calc-widget {
        background: #2c3e50;
        border-color: #34495e;
        color: white;
    }
    
    .math-calc-widget h3 {
        color: white;
    }
    
    .math-calc-input {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
    
    .math-calc-input:focus {
        border-color: #667eea;
    }
    
    .math-calc-display {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
}

/* Animation for result appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.math-calc-result,
.math-calc-error {
    animation: fadeInUp 0.4s ease-out;
}

/* Loading spinner */
.math-calc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

