/* SMP Visualizer CSS */
.smp-container {
    font-family: inherit; /* inherit from academicpages theme */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.smp-description {
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.smp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

.smp-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smp-input-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #000 !important;
}

.smp-input-group input[type="date"] {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    margin: 0 !important;
    height: 44px;
    box-sizing: border-box;
    color: #000 !important;
    background-color: #fff !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.smp-input-group input[type="date"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.smp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    line-height: 1.4;
    font-family: inherit;
    margin: 0 !important;
    height: 44px; /* Matches input boxes */
    box-sizing: border-box;
}

.smp-btn:active {
    transform: translateY(1px);
}

.smp-btn-primary {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.smp-btn-primary:hover {
    background-color: #2563eb;
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
}

.smp-btn-secondary {
    background-color: #10b981;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.smp-btn-secondary:hover {
    background-color: #059669;
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.4);
}

.smp-chart-container {
    position: relative;
    height: 60vh;
    min-height: 400px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

.smp-error {
    padding: 12px 16px;
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.smp-success {
    padding: 12px 16px;
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Loading Spinner */
.smp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    color: #4b5563;
    font-weight: 500;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: smp-spin 1s ease-in-out infinite;
}

@keyframes smp-spin {
    to { transform: rotate(360deg); }
}

/* Dark mode overrides (if site adds .dark-mode class or via media query) */
@media (prefers-color-scheme: dark) {
    .smp-container {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.05);
    }
    .smp-controls {
        background: rgba(255, 255, 255, 0.05);
    }
    .smp-chart-container {
        background: #1f2937;
        border-color: #374151;
    }
    .smp-loading {
        color: #d1d5db;
    }
}
