/**
 * Smart Percentage Calculator CSS
 */

:root {
    --spc-primary: #4c4691; 
    --spc-primary-light: #ebebff;
    --spc-primary-dark: #3c3870;
    --spc-white: #ffffff;
    --spc-gray-50: #f8f9fa;
    --spc-gray-100: #f1f3f5;
    --spc-gray-200: #e9ecef;
    --spc-gray-300: #dee2e6;
    --spc-gray-400: #ced4da;
    --spc-gray-500: #adb5bd;
    --spc-gray-600: #6c757d;
    --spc-gray-700: #495057;
    --spc-gray-800: #343a40;
    --spc-gray-900: #212529;
    --spc-green: #40c057;
    --spc-red: #fa5252;
    --spc-radius: 0.5rem;
    --spc-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --spc-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Container */
.spc-container {
    max-width: 100%;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--spc-gray-800);
}

/* Calculators wrapper */
.spc-calculators-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Calculator card */
.spc-calculator {
    background-color: var(--spc-white);
    border-radius: var(--spc-radius);
    box-shadow: var(--spc-shadow);
    overflow: hidden;
    padding: 1.5rem;
}

/* Calculator header */
.spc-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.spc-calculator-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--spc-gray-800);
    margin: 0;
}

.spc-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--spc-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spc-icon i {
    color: var(--spc-primary);
    font-size: 1rem;
}

/* Calculator content */
.spc-calculator-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input groups */
.spc-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spc-input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--spc-gray-700);
}

.spc-input {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--spc-gray-300);
    border-radius: var(--spc-radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.spc-input:focus {
    border-color: var(--spc-primary);
    box-shadow: 0 0 0 3px rgba(76, 70, 145, 0.15);
    outline: none;
}

/* Results */
.spc-result-box {
    background-color: var(--spc-gray-50);
    padding: 1rem;
    border-radius: var(--spc-radius);
}

.spc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.spc-result-label {
    font-size: 0.875rem;
    color: var(--spc-gray-600);
}

.spc-result-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--spc-primary);
}

.spc-result-value-small {
    font-size: 0.875rem;
    color: var(--spc-gray-700);
}

/* Progress bar */
.spc-progress-bar {
    height: 0.5rem;
    width: 100%;
    background-color: var(--spc-gray-200);
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.spc-progress-fill {
    height: 100%;
    background-color: var(--spc-primary);
    border-radius: 1rem;
    transition: width 0.3s ease-out;
}

/* Color variants */
.spc-increase {
    color: var(--spc-green);
}

.spc-increase.spc-progress-fill {
    background-color: var(--spc-green);
}

.spc-decrease {
    color: var(--spc-red);
}

.spc-decrease.spc-progress-fill {
    background-color: var(--spc-red);
}

/* Responsive */
@media (max-width: 768px) {
    .spc-calculators-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Styling for WordPress admin */
.wp-admin .spc-container {
    max-width: 100%;
}